Skip to content

Commit

Permalink
chore: register new pytest ssh key mock markers in pyproject.toml
Browse files Browse the repository at this point in the history
In PR #406, two pytest marks were added to help with mocking ssh
keys in unit tests, but the marks were not registered with pytest
so it was raising errors. This commit fixes that!

Also, migrate existing pytest configuration from tox.ini to
pyproject.toml
  • Loading branch information
a-dubs committed Oct 18, 2024
1 parent c05deab commit faf2d9c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1!10.1.2
1!10.2.0
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,12 @@ extend-select = [

[tool.ruff.lint.pydocstyle]
convention = "pep257"

[tool.pytest.ini_options]
markers = [
"mock_ssh_keys: mock the base cloud _get_ssh_keys method to avoid checking for ssh keys",
"dont_mock_ssh_keys: if a class or method is marked with this, it will override the mock_ssh_keys marker",
"ci: run test as part of continuous integration on PRs using GitHub Actions",
"main_check: run test as part of continuous integration after branch has merged to main using GitHub Actions",
]
testpaths = ["tests/unit_tests"]
6 changes: 0 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,3 @@ commands = {envpython} -m pytest -n 5 -m main_check --log-cli-level=DEBUG -svv {
deps = {[testenv:integration-tests-ci]deps}
passenv =
GOOGLE_APPLICATION_CREDENTIALS

[pytest]
testpaths = tests/unit_tests
markers =
ci: run test on as part of continuous integration
main_check: run test after branch has merged to main

0 comments on commit faf2d9c

Please sign in to comment.