Remove reference to bin when importing modules in some unit tests (BugFix) #874
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When running
./manage.py test -u
from the provider, unittest is made aware of the content of the bin/ directory so Python code from this directory can be imported directly.Description
When preparing a presentation about unit testing in Checkbox, I found that some unit tests import scripts from bin, which is not required when running unit tests the usual way (
./manage.py test -u
).Resolved issues
Running unit tests locally using the
./manage.py test -u
command.Tests
./manage.py test -u
command from the base provider directory in a venv.PYTHONPATH=~/checkbox/providers/base/bin python -m unittest test_camera_quality.py
from theproviders/base/tests/
directory.