-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add settings test #55
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm liking the parameterized tests!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameterization and the custom marks look good to me!
I agree with @thekaveman 's feedback that we could remove those redundant lines in the workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
closes #54
What this PR does:
test_settings
file - this test should test that a new.env
file with a differentINPUT_HASH_ALGO
variable will appropriately set that new value tosettings.INPUT_HASH_ALGO
..env.settingstest
file to be used on the new test, with the custom marker,@pytest.mark.settingstest
pytest.ini
file to register the new custom markerrun_test
GitHub Action to run the test suite twice: on the first run, test all but the@pytest.mark.settingstest
spec, and on the second run, run only that spec. In between the two runs, runsource tests/.env.settingstest
so that the test environment can read from the 2nd .env filetest_database
andtest_hash
with parameterizationHow I'm using the custom
@pytest.mark
pytest.ini
- to document the mark and what it means. This isn't required for implementation, but is highly recommended:@pytest.mark.settingstest
:pytest
using the mark:## Run all test with the mark coverage run -m pytest -m settingstest
This is what the output looks like: