Skip to content

Commit

Permalink
Change processing of ignore dependencies and bump to 2.0.9dev1
Browse files Browse the repository at this point in the history
  • Loading branch information
tarpas committed Jun 1, 2023
1 parent 6be91ed commit 9733b1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion testmon/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""PYTEST_DONT_REWRITE"""
VERSION = "2.0.9dev0"
VERSION = "2.0.9dev1"
14 changes: 9 additions & 5 deletions testmon/pytest_testmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def pytest_addoption(parser):
)

parser.addini("environment_expression", "environment expression", default="")
parser.addini("ignore_dependencies", "ignore dependencies", default=[])
parser.addini("testmon_ignore_dependencies", "ignore dependencies", default=[])
parser.addini("testmon_url", "URL of the testmon.net api server.")
parser.addini("tmnet_api_key", "testmon api key")

Expand All @@ -132,10 +132,14 @@ def init_testmon_data(config):
environment = config.getoption("environment_expression") or eval_environment(
config.getini("environment_expression")
)
ignore_dependencies_str = config.getini("ignore_dependencies")
ignore_dependencies = (
ignore_dependencies_str.split("\n") if ignore_dependencies_str else None
)
ignore_dependencies_arg = config.getini("testmon_ignore_dependencies")
if type(ignore_dependencies_arg) in (list, tuple):
ignore_dependencies = ignore_dependencies_arg
elif ignore_dependencies_arg and "\n" in ignore_dependencies_arg:
ignore_dependencies = ignore_dependencies_arg.split("\n")
else:
ignore_dependencies = ignore_dependencies_arg

system_packages = get_system_packages(ignore=ignore_dependencies)

url = config.getini("testmon_url")
Expand Down

0 comments on commit 9733b1b

Please sign in to comment.