codemie-test-harness 0.1.127__py3-none-any.whl → 0.1.128__py3-none-any.whl

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.

Potentially problematic release.


This version of codemie-test-harness might be problematic. Click here for more details.

@@ -2,13 +2,43 @@ from __future__ import annotations
2
2
  import subprocess
3
3
  import sys
4
4
  from typing import Iterable, List
5
+ from pathlib import Path
6
+
7
+ try:
8
+ from importlib.resources import files as pkg_files
9
+ except Exception:
10
+ pkg_files = None
11
+
5
12
  from .constants import CONSOLE
6
13
 
7
14
 
15
+ def _resolve_tests_path() -> str:
16
+ """Resolve absolute path to the installed tests package.
17
+
18
+ Priority:
19
+ 1) importlib.resources.files("tests") if the package is installed
20
+ 2) Fallback to repo layout: <repo_root>/tests relative to this file
21
+ """
22
+ # 1) Use importlib.resources to locate installed package "tests"
23
+ if pkg_files is not None:
24
+ try:
25
+ tests_dir = pkg_files("tests")
26
+ # Convert to a concrete filesystem path string
27
+ return str(Path(tests_dir.joinpath("")))
28
+ except Exception:
29
+ pass
30
+
31
+ # 2) Fallback to repo layout when running from source
32
+ # runner.py -> cli -> codemie_test_harness -> <repo_root>
33
+ repo_root = Path(__file__).resolve().parents[2]
34
+ return str(repo_root / "tests")
35
+
36
+
8
37
  def build_pytest_cmd(
9
38
  workers: int, marks: str, reruns: int, extra: Iterable[str] | None = None
10
39
  ) -> List[str]:
11
- cmd = [sys.executable, "-m", "pytest", "../../tests"]
40
+ tests_path = _resolve_tests_path()
41
+ cmd = [sys.executable, "-m", "pytest", tests_path]
12
42
  if workers:
13
43
  cmd += ["-n", str(workers)]
14
44
  if marks:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: codemie-test-harness
3
- Version: 0.1.127
3
+ Version: 0.1.128
4
4
  Summary: Autotest for CodeMie backend and UI
5
5
  Author: Anton Yeromin
6
6
  Author-email: anton_yeromin@epam.com
@@ -13,7 +13,7 @@ Requires-Dist: aws-assume-role-lib (>=2.10.0,<3.0.0)
13
13
  Requires-Dist: boto3 (>=1.39.8,<2.0.0)
14
14
  Requires-Dist: click (>=8.1.7,<9.0.0)
15
15
  Requires-Dist: codemie-plugins (>=0.1.123,<0.2.0)
16
- Requires-Dist: codemie-sdk-python (==0.1.127)
16
+ Requires-Dist: codemie-sdk-python (==0.1.128)
17
17
  Requires-Dist: pytest (>=8.4.1,<9.0.0)
18
18
  Requires-Dist: pytest-playwright (>=0.7.0,<0.8.0)
19
19
  Requires-Dist: pytest-reportportal (>=5.5.2,<6.0.0)
@@ -4,7 +4,7 @@ codemie_test_harness/cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
4
4
  codemie_test_harness/cli/commands/config_cmd.py,sha256=iCV7qJZrESIKZQdg_AmhuPz1EZLN2s-UpbdzzIjrVEU,1353
5
5
  codemie_test_harness/cli/commands/run_cmd.py,sha256=T5js1hwHKi1QuF-kLwP3c-GMtiO9QO15H3JJc7nzpp4,1052
6
6
  codemie_test_harness/cli/constants.py,sha256=956_apPJ4MjhnKo1ZtDooXCd2N89J3vyAB-J9-SOr7U,1637
7
- codemie_test_harness/cli/runner.py,sha256=AqED6FlYvvMOJdxTiTykgcXnmVzWKf0PXc_RTf-Kcv4,801
7
+ codemie_test_harness/cli/runner.py,sha256=e8shcJLAQOCw7br7UVfkl4eU7MV7tHOY6CFLOSE96wg,1744
8
8
  codemie_test_harness/cli/utils.py,sha256=NlRa8VFbXTbD74jfUaSqbccGNu2R1dUIg8d5SyDTmIM,1136
9
9
  tests/__init__.py,sha256=nvgBwCx27qm2YIE4hzAwqoD0sMmUVF9Kec-ndl7CFZ8,994
10
10
  tests/assistant/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -314,7 +314,7 @@ tests/workflow/virtual_assistant_tools/servicenow/__init__.py,sha256=47DEQpj8HBS
314
314
  tests/workflow/virtual_assistant_tools/servicenow/test_workflow_with_servicenow_tools.py,sha256=ecTfkwxPMbyyEKS-dArAQkluZURO1nThwDdD66mgC3E,814
315
315
  tests/workflow/virtual_assistant_tools/vcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
316
316
  tests/workflow/virtual_assistant_tools/vcs/test_workflow_with_vcs_tools.py,sha256=G0iI3X7SGEEy1Z2Hc7j917saY3lpzgfil_GtALCFilE,1043
317
- codemie_test_harness-0.1.127.dist-info/METADATA,sha256=99AQgcfkydHxy2EAcC4EEPoxA2tlfS0TF3FI7Q8JxOM,8998
318
- codemie_test_harness-0.1.127.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
319
- codemie_test_harness-0.1.127.dist-info/entry_points.txt,sha256=n98t-EOM5M1mnMl_j2X4siyeO9zr0WD9a5LF7JyElIM,73
320
- codemie_test_harness-0.1.127.dist-info/RECORD,,
317
+ codemie_test_harness-0.1.128.dist-info/METADATA,sha256=_lnQLk4z8G70SdoyMeeqhBiIdQcXRGnDPYWLm2dzg9o,8998
318
+ codemie_test_harness-0.1.128.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
319
+ codemie_test_harness-0.1.128.dist-info/entry_points.txt,sha256=n98t-EOM5M1mnMl_j2X4siyeO9zr0WD9a5LF7JyElIM,73
320
+ codemie_test_harness-0.1.128.dist-info/RECORD,,