diff --git a/testmon/__init__.py b/testmon/__init__.py index e592259..1bdbb55 100644 --- a/testmon/__init__.py +++ b/testmon/__init__.py @@ -1,2 +1,2 @@ """PYTEST_DONT_REWRITE""" -VERSION = "2.0.9dev1" +VERSION = "2.0.9" diff --git a/testmon/db.py b/testmon/db.py index 6cbe1bd..5b8ec90 100644 --- a/testmon/db.py +++ b/testmon/db.py @@ -271,12 +271,13 @@ def insert_test_file_fps(self, tests_deps_n_outcomes, exec_id=None): test_execution_file_fps.append((te_id, fingerprint_id)) files_fshas.add((record["filename"], record["fsha"])) - cursor.executemany( - "INSERT INTO test_execution_file_fp VALUES (?, ?)", - test_execution_file_fps, - ) - self.fetch_or_create_file_fp.cache_clear() - self.insert_into_suite_files_fshas(con, exec_id, files_fshas) + if test_execution_file_fps: + cursor.executemany( + "INSERT INTO test_execution_file_fp VALUES (?, ?)", + test_execution_file_fps, + ) + self.fetch_or_create_file_fp.cache_clear() + self.insert_into_suite_files_fshas(con, exec_id, files_fshas) def insert_into_suite_files_fshas(self, con, exec_id, files_fshas): pass diff --git a/testmon/pytest_testmon.py b/testmon/pytest_testmon.py index 01ee721..0a530dc 100644 --- a/testmon/pytest_testmon.py +++ b/testmon/pytest_testmon.py @@ -112,7 +112,7 @@ def pytest_addoption(parser): parser.addini("environment_expression", "environment expression", default="") parser.addini("testmon_ignore_dependencies", "ignore dependencies", default=[]) - parser.addini("testmon_url", "URL of the testmon.net api server.") + parser.addini("tmnet_url", "URL of the testmon.net api server.") parser.addini("tmnet_api_key", "testmon api key") @@ -135,14 +135,14 @@ def init_testmon_data(config): 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: + elif "\n" in ignore_dependencies_arg: ignore_dependencies = ignore_dependencies_arg.split("\n") else: - ignore_dependencies = ignore_dependencies_arg + ignore_dependencies = None system_packages = get_system_packages(ignore=ignore_dependencies) - url = config.getini("testmon_url") + url = config.getini("tmnet_url") rpc_proxy = None if config.testmon_config.tmnet or getattr(config, "tmnet", None):