You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python packages with test methods should have tests added to them.
First thing to include is the install time test callbacks:
class ...
install_time_test_callbacks= ['import_module_test']
...
Also, where package has pytest tests set up, you can use the following to overwrite the default PythonPackage test behaviour to execute pytests:
class ...
deftest(self):
# `setup.py test` should not be used as:# - `python3 -m pytest -v` should be ran instead# - the builtin `test` method runs before `install` is finishedself.pytest()
defpytest(self):
withworking_dir('.'):
prefix=self.spec.prefix# Add bin to path here, as tests also check entrypointsenv['PATH'] =env['PATH']+":"+prefix+"/bin"python('-m', 'pytest', '-v')
...
Where the prefix... and env lines are only required when testing packages that implement entrypoints.
The text was updated successfully, but these errors were encountered:
Python packages with test methods should have tests added to them.
First thing to include is the install time test callbacks:
Also, where package has
pytest
tests set up, you can use the following to overwrite the defaultPythonPackage
test behaviour to execute pytests:Where the
prefix...
andenv
lines are only required when testing packages that implement entrypoints.The text was updated successfully, but these errors were encountered: