This repository has been archived by the owner on Aug 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from datawire/develop
Python 3, fix NPM package.
- Loading branch information
Showing
40 changed files
with
176 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1.0.406 | ||
v1.0.443 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ travispy==0.3.5 | |
twine==1.8.1 | ||
pytest==3.0.1 | ||
pytest-xdist==1.15.0 | ||
future==0.15.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from __future__ import print_function | ||
|
||
import os | ||
from subprocess import check_call | ||
import pytest | ||
|
||
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||
official = open(os.path.join(ROOT_DIR, "QUARK_VERSION.txt")).read().strip() | ||
try: | ||
dirty = open(os.path.join(ROOT_DIR, "QUARK_VERSION-dirty.txt")).read().strip() | ||
QUARK_VERSION = dirty | ||
QUARK_VERSION_STATUS = "Overriding the quark version %s with the local quark version %s" % (official, dirty) | ||
except IOError: | ||
QUARK_VERSION = official | ||
QUARK_VERSION_STATUS = "Testing with quark version %s, QUARK_VERSION-dirty.txt not found" % (official) | ||
# Git tag starts with v, but the Docker tag does not: | ||
if QUARK_VERSION.startswith("v"): | ||
QUARK_VERSION = QUARK_VERSION[1:] | ||
|
||
|
||
def pytest_report_header(config): | ||
return QUARK_VERSION_STATUS | ||
|
||
def run(filepath, language): | ||
"""Install and run a Quark test file.""" | ||
docker_path = os.path.join("/code", | ||
filepath[len(ROOT_DIR) + 1:]) | ||
print("Installing and running {} in {}...".format(filepath, language)) | ||
check_call(["sudo", "docker", "run", | ||
# Mount volume into container so Docker can access quark files: | ||
"-v", ROOT_DIR + ":/code",] + | ||
["datawire/quark-run:" + QUARK_VERSION, "--" + language, '--verbose', docker_path]) | ||
|
||
@pytest.fixture | ||
def quark_run(request): | ||
return run | ||
|
||
@pytest.fixture(params= ["python3", "python", "java", "ruby", "javascript"]) | ||
def quark_language(request): | ||
return request.param |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
""" | ||
Run tests written in Quark. | ||
""" | ||
from __future__ import print_function | ||
|
||
import os | ||
from glob import glob | ||
import pytest | ||
|
||
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||
QUARK_TESTS_DIR = os.path.join(ROOT_DIR, "quark/tests") | ||
|
||
# Tests that don't need to run on all languages: | ||
@pytest.fixture(params=[filename for filename in glob(QUARK_TESTS_DIR + "/*.q") | ||
if not filename.endswith("runtime_test.q")]) | ||
def filepath(request): | ||
return request.param | ||
|
||
|
||
def test_run_python_only(quark_run, filepath): | ||
"""Run Quark tests that don't need to run in multiple languages.""" | ||
quark_run(filepath, "python") | ||
|
||
def test_run_python3_only(quark_run, filepath): | ||
"""Run Quark tests that don't need to run in multiple languages.""" | ||
quark_run(filepath, "python3") | ||
|
||
|
||
def test_run_all_languages(quark_run, quark_language): | ||
"""Run tests that have to be run in all languages.""" | ||
quark_run(os.path.join(QUARK_TESTS_DIR, "runtime_test.q"), quark_language) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
quark 1.0; | ||
|
||
package datawire_mdk 2.0.11; | ||
package datawire_mdk 2.0.12; | ||
|
||
// DATAWIRE MDK | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.