-
Notifications
You must be signed in to change notification settings - Fork 4
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 #11 from Autodesk/0.7.1fixes
0.7.1fixes
- Loading branch information
Showing
9 changed files
with
142 additions
and
131 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
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
Empty file.
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 @@ | ||
import pytest | ||
import pyccc | ||
|
||
__all__ = 'typedfixture fixture_types subprocess_engine public_ccc_engine local_docker_engine'.split() | ||
|
||
fixture_types = {} | ||
|
||
|
||
def typedfixture(*types, **kwargs): | ||
"""This is a decorator that lets us associate fixtures with one or more arbitrary types. | ||
This makes it easy, later, to run the same test on all fixtures of a given type""" | ||
|
||
def fixture_wrapper(func): | ||
for t in types: | ||
fixture_types.setdefault(t, []).append(func.__name__) | ||
return pytest.fixture(**kwargs)(func) | ||
|
||
return fixture_wrapper | ||
|
||
|
||
################### | ||
# Fixtures # | ||
################### | ||
|
||
@typedfixture('engine') | ||
def subprocess_engine(): | ||
return pyccc.Subprocess() | ||
|
||
|
||
@typedfixture('engine') | ||
def public_ccc_engine(): | ||
if not pytest.config.getoption("--testccc"): | ||
pytest.skip("need --testccc option to run") | ||
else: | ||
return pyccc.CloudComputeCannon('cloudcomputecannon.bionano.autodesk.com:9000') | ||
|
||
|
||
@typedfixture('engine') | ||
def local_docker_engine(): | ||
return pyccc.Docker() |
Oops, something went wrong.