-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move test suite out of caput (#274)
And fix the pytest.fixture things I was complaining about.
- Loading branch information
1 parent
1b543a0
commit d487c67
Showing
23 changed files
with
99 additions
and
97 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 was deleted.
Oops, something went wrong.
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.
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.
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.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"""Test running the caput.pipeline.""" | ||
|
||
|
||
def test_pipeline(run_pipeline): | ||
"""Test running a very simple pipeline.""" | ||
result = run_pipeline() | ||
print(result.output) | ||
assert result.exit_code == 0 | ||
|
||
|
||
def test_pipeline_multiple_outputs(run_pipeline): | ||
"""Test running a very simple pipeline with a multi-output task.""" | ||
|
||
multi_eggs_pipeline_conf = """ | ||
--- | ||
pipeline: | ||
tasks: | ||
- type: tests.conftest.GetEggs | ||
params: eggs_params | ||
out: [color, egg] | ||
- type: tests.conftest.CookEggs | ||
params: cook_params | ||
in: egg | ||
- type: tests.conftest.CookEggs | ||
params: cook_params | ||
in: color | ||
eggs_params: | ||
eggs: [['green', 'duck'], ['blue', 'ostrich']] | ||
cook_params: | ||
style: 'fried' | ||
""" | ||
|
||
result = run_pipeline(configstr=multi_eggs_pipeline_conf) | ||
print(result.output) | ||
assert result.exit_code == 0 |
6 changes: 2 additions & 4 deletions
6
caput/tests/test_psutilprofiler.py → tests/test_psutilprofiler.py
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,10 +1,8 @@ | ||
"""Test running the caput.pipeline.""" | ||
|
||
from caput.tests import conftest | ||
|
||
|
||
def test_pipeline(): | ||
def test_pipeline(run_pipeline): | ||
"""Test profiling a very simple pipeline.""" | ||
result = conftest.run_pipeline(["--psutil"]) | ||
result = run_pipeline(["--psutil"]) | ||
print(result.output) | ||
assert result.exit_code == 0 |
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.
File renamed without changes.