pytest-testmon 2.1.3__tar.gz → 2.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {pytest_testmon-2.1.3/pytest_testmon.egg-info → pytest_testmon-2.1.4}/PKG-INFO +3 -2
  2. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4/pytest_testmon.egg-info}/PKG-INFO +3 -2
  3. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/pytest_testmon.egg-info/SOURCES.txt +1 -2
  4. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/testmon/__init__.py +1 -1
  5. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/testmon/common.py +1 -1
  6. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/testmon/db.py +1 -0
  7. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/testmon/process_code.py +7 -1
  8. pytest_testmon-2.1.3/testmon/tox_testmon.py +0 -42
  9. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/LICENSE +0 -0
  10. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/MANIFEST.in +0 -0
  11. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/README.md +0 -0
  12. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/pyproject.toml +0 -0
  13. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/pytest_testmon.egg-info/dependency_links.txt +0 -0
  14. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/pytest_testmon.egg-info/entry_points.txt +0 -0
  15. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/pytest_testmon.egg-info/requires.txt +0 -0
  16. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/pytest_testmon.egg-info/top_level.txt +0 -0
  17. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/setup.cfg +0 -0
  18. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/setup.py +0 -0
  19. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/testmon/configure.py +0 -0
  20. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/testmon/pytest_testmon.py +0 -0
  21. {pytest_testmon-2.1.3 → pytest_testmon-2.1.4}/testmon/testmon_core.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pytest-testmon
3
- Version: 2.1.3
3
+ Version: 2.1.4
4
4
  Summary: selects tests affected by changed files and methods
5
5
  Author-email: Tibor Arpas <tibor@testmon.org>
6
6
  License: MIT
@@ -20,6 +20,7 @@ Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
21
  Requires-Dist: pytest<9,>=5
22
22
  Requires-Dist: coverage<8,>=6
23
+ Dynamic: license-file
23
24
 
24
25
  <img src=https://user-images.githubusercontent.com/135344/219700265-0a9b152f-7285-4607-bbce-0c9aeddd520b.svg width=300>
25
26
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pytest-testmon
3
- Version: 2.1.3
3
+ Version: 2.1.4
4
4
  Summary: selects tests affected by changed files and methods
5
5
  Author-email: Tibor Arpas <tibor@testmon.org>
6
6
  License: MIT
@@ -20,6 +20,7 @@ Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
21
  Requires-Dist: pytest<9,>=5
22
22
  Requires-Dist: coverage<8,>=6
23
+ Dynamic: license-file
23
24
 
24
25
  <img src=https://user-images.githubusercontent.com/135344/219700265-0a9b152f-7285-4607-bbce-0c9aeddd520b.svg width=300>
25
26
 
@@ -15,5 +15,4 @@ testmon/configure.py
15
15
  testmon/db.py
16
16
  testmon/process_code.py
17
17
  testmon/pytest_testmon.py
18
- testmon/testmon_core.py
19
- testmon/tox_testmon.py
18
+ testmon/testmon_core.py
@@ -1,2 +1,2 @@
1
1
  """PYTEST_DONT_REWRITE"""
2
- TESTMON_VERSION = "2.1.3"
2
+ TESTMON_VERSION = "2.1.4"
@@ -81,7 +81,7 @@ def get_system_packages(ignore=None):
81
81
  {
82
82
  f"{package} {version}"
83
83
  for (package, version) in get_system_packages_raw()
84
- if not package in ignore
84
+ if package not in ignore and package != "UNKNOWN" and version != "0.0.0"
85
85
  }
86
86
  )
87
87
  )
@@ -656,6 +656,7 @@ class DB: # pylint: disable=too-many-public-methods
656
656
  id, environment_name, system_packages, python_version
657
657
  FROM environment
658
658
  WHERE environment_name = ?
659
+ ORDER BY id DESC
659
660
  """,
660
661
  (environment_name,),
661
662
  ).fetchone()
@@ -168,10 +168,16 @@ class Module:
168
168
  self.dump_and_block(item, _next_lineno(node, i, end))
169
169
  )
170
170
  if into_block and node:
171
+ # Use last child's end_lineno only if end is not available (None)
172
+ if end is None:
173
+ last_child = node[-1]
174
+ block_end = getattr(last_child, "end_lineno", None)
175
+ else:
176
+ block_end = end
171
177
  self._blocks.append(
172
178
  Block(
173
179
  node[0].lineno,
174
- end,
180
+ block_end,
175
181
  code=str(self.counter) + ":" + ", ".join(representations),
176
182
  name=name,
177
183
  )
@@ -1,42 +0,0 @@
1
- from pathlib import Path
2
- import pluggy
3
-
4
- from tox.config import DepConfig
5
-
6
- hookimpl = pluggy.HookimplMarker("tox")
7
-
8
-
9
- def _uses_testmon(envconfig):
10
-
11
- for command in envconfig.commands:
12
- if "--testmon" in command:
13
- return True
14
- return False
15
-
16
-
17
- def touch_stampfile(venv):
18
- Path(venv.path.join(".testmon_installed")).touch()
19
-
20
-
21
- def installed_testmon(venv):
22
- return Path(venv.path.join(".testmon_installed")).exists()
23
-
24
-
25
- @hookimpl
26
- def tox_runenvreport(venv, action):
27
- if "TESTMON_DATAFILE" in venv.envconfig.setenv:
28
- datafile = venv.envconfig.setenv["TESTMON_DATAFILE"]
29
- action.setactivity("testmon", f"keeping TESTMON_DATAFILE={datafile}")
30
- else:
31
- datafile = str(venv.path.join(".testmondata"))
32
- action.setactivity("testmon", f"setting TESTMON_DATAFILE={datafile}")
33
- venv.envconfig.setenv["TESTMON_DATAFILE"] = datafile
34
-
35
- if _uses_testmon(venv.envconfig) and "pytest-testmon" not in (
36
- x.name for x in venv.envconfig.deps
37
- ):
38
- if not installed_testmon(venv):
39
- action.setactivity("testmon", "installing pytest-testmon")
40
- venv._install([DepConfig("pytest-testmon")], action=action)
41
-
42
- touch_stampfile(venv)
File without changes
File without changes
File without changes
File without changes