codemie-test-harness 0.1.126__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.126
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.126)
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
@@ -267,7 +267,7 @@ tests/workflow/direct_tools_calling/test_workflow_with_ado_test_plan_tools.py,sh
267
267
  tests/workflow/direct_tools_calling/test_workflow_with_ado_wiki_tools.py,sha256=hQUDj71Uzt0zkNjPP_b_opXfFl-SnUb9rpHxUO65jAk,2693
268
268
  tests/workflow/direct_tools_calling/test_workflow_with_ado_work_item_tools.py,sha256=sXGmqswUXgjZbfRWAbz65ZvcGe1AJVquKFahGn8LfEM,2757
269
269
  tests/workflow/direct_tools_calling/test_workflow_with_cloud_tools.py,sha256=0gjWaURg61PDhW7E16K7qam50OESdIBZw7puPcxJwKk,3467
270
- tests/workflow/direct_tools_calling/test_workflow_with_codebase_tools.py,sha256=wygzuEVyWswZrWp8hcsD4gjLsG97EvvQ1QJPfWGS61Q,3737
270
+ tests/workflow/direct_tools_calling/test_workflow_with_codebase_tools.py,sha256=Lbq9Oe7N1HXYTypHHSZLjSinbMHKhvw574eq7C2ptmc,3737
271
271
  tests/workflow/direct_tools_calling/test_workflow_with_data_management_tools.py,sha256=dE8y6mTpmNiBL6t_OFBzKZrYwtQiJaAVBFG9TfYaxV8,3674
272
272
  tests/workflow/direct_tools_calling/test_workflow_with_file_management_tools.py,sha256=pNAqimzrCRdxo3t_XtaPRR6a6Ddi3yvnzYg9E9VlhAk,2631
273
273
  tests/workflow/direct_tools_calling/test_workflow_with_notification_tools.py,sha256=wl8BMUzOILiQ4u7MnMmKjUXWBuZ4piQrIxZoi-TswHs,2847
@@ -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.126.dist-info/METADATA,sha256=EuLnOR2itCUP0ld1vlEqgxacxkeCkAxXo8GL8PYKtRY,8998
318
- codemie_test_harness-0.1.126.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
319
- codemie_test_harness-0.1.126.dist-info/entry_points.txt,sha256=n98t-EOM5M1mnMl_j2X4siyeO9zr0WD9a5LF7JyElIM,73
320
- codemie_test_harness-0.1.126.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,,
@@ -48,7 +48,7 @@ def test_workflow_with_sonar_tools_direct(
48
48
  response = workflow_utils.execute_workflow(
49
49
  test_workflow.id, assistant_and_state_name, user_input=json.dumps(prompt)
50
50
  )
51
- similarity_check.check_similarity(response, expected_response, 95)
51
+ similarity_check.check_similarity(response, expected_response, 80)
52
52
 
53
53
 
54
54
  @pytest.mark.regression
@@ -87,7 +87,7 @@ def test_workflow_with_sonar_tools_with_hardcoded_args(
87
87
  response = workflow_utils.execute_workflow(
88
88
  test_workflow.id, assistant_and_state_name
89
89
  )
90
- similarity_check.check_similarity(response, expected_response, 95)
90
+ similarity_check.check_similarity(response, expected_response, 80)
91
91
 
92
92
 
93
93
  @pytest.mark.regression
@@ -129,4 +129,4 @@ def test_workflow_with_sonar_tools_with_overriding_args(
129
129
  response = workflow_utils.execute_workflow(
130
130
  test_workflow.id, assistant_and_state_name, user_input=json.dumps(prompt)
131
131
  )
132
- similarity_check.check_similarity(response, expected_response, 95)
132
+ similarity_check.check_similarity(response, expected_response, 80)