Skip to content

Commit

Permalink
pytest-testmon 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Pokorny committed Mar 22, 2023
1 parent 1a9493c commit ca2f628
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "pytest-testmon"
authors = [
{ name = "Tibor Arpas", email = "[email protected]" },
]
version = "2.0.0b2"
version = "2.0.0"
description = "selects tests affected by changed files and methods"
readme = "README.md"
requires-python = ">=3.7"
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pytest-testmon
version = 2.0.0b0
version = 2.0.0
license = AGPL
author_email = [email protected]
author = Tibor Arpas, Tomas Matlovic
Expand Down
34 changes: 16 additions & 18 deletions testmon/testmon_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,25 +200,23 @@ def get_tests_fingerprints(self, nodes_files_lines, reports):
def sync_db_fs_tests(self, retain):
collected = retain.union(set(self.stable_test_names))
add = list(collected - set(self.all_tests))
for i in range(0, len(add), TEST_BATCH_SIZE):
add_batch = add[i : i + TEST_BATCH_SIZE]
with self.db as database:
test_execution_file_fps = {
test_name: {
"deps": (
{
"filename": home_file(test_name),
"method_checksums": methods_to_checksums(["0match"]),
"mtime": None,
"checksum": None,
},
)
}
for test_name in add_batch
if is_python_file(home_file(test_name))
with self.db:
test_execution_file_fps = {
test_name: {
"deps": (
{
"filename": home_file(test_name),
"method_checksums": methods_to_checksums(["0match"]),
"mtime": None,
"checksum": None,
},
)
}
if test_execution_file_fps:
self.save_test_execution_file_fps(test_execution_file_fps)
for test_name in add
if is_python_file(home_file(test_name))
}
if test_execution_file_fps:
self.save_test_execution_file_fps(test_execution_file_fps)

to_delete = list(set(self.all_tests) - collected)
with self.db as database:
Expand Down

0 comments on commit ca2f628

Please sign in to comment.