cli-test-framework 0.4.2__tar.gz → 0.4.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 (94) hide show
  1. {cli_test_framework-0.4.2/src/cli_test_framework.egg-info → cli_test_framework-0.4.4}/PKG-INFO +2 -2
  2. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/setup.py +2 -2
  3. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/__init__.py +1 -1
  4. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/runners/parallel_json_runner.py +33 -0
  5. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/utils/path_resolver.py +46 -72
  6. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4/src/cli_test_framework.egg-info}/PKG-INFO +2 -2
  7. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework.egg-info/requires.txt +1 -1
  8. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/MANIFEST.in +0 -0
  9. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/README.md +0 -0
  10. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/docs/user_manual.md +0 -0
  11. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/pyproject.toml +0 -0
  12. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/setup.cfg +0 -0
  13. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/cli.py +0 -0
  14. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/commands/__init__.py +0 -0
  15. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/commands/compare.py +0 -0
  16. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/core/__init__.py +0 -0
  17. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/core/assertions.py +0 -0
  18. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/core/base_runner.py +0 -0
  19. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/core/execution.py +0 -0
  20. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/core/parallel_runner.py +0 -0
  21. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/core/process_worker.py +0 -0
  22. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/core/setup.py +0 -0
  23. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/core/test_case.py +0 -0
  24. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/core/types.py +0 -0
  25. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/file_comparator/__init__.py +0 -0
  26. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/file_comparator/base_comparator.py +0 -0
  27. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/file_comparator/binary_comparator.py +0 -0
  28. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/file_comparator/csv_comparator.py +0 -0
  29. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/file_comparator/factory.py +0 -0
  30. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/file_comparator/h5_comparator.py +0 -0
  31. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/file_comparator/json_comparator.py +0 -0
  32. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/file_comparator/result.py +0 -0
  33. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/file_comparator/text_comparator.py +0 -0
  34. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/file_comparator/xml_comparator.py +0 -0
  35. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/runners/__init__.py +0 -0
  36. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/runners/json_runner.py +0 -0
  37. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/runners/yaml_runner.py +0 -0
  38. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/utils/__init__.py +0 -0
  39. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework/utils/report_generator.py +0 -0
  40. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework.egg-info/SOURCES.txt +0 -0
  41. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework.egg-info/dependency_links.txt +0 -0
  42. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework.egg-info/entry_points.txt +0 -0
  43. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/src/cli_test_framework.egg-info/top_level.txt +0 -0
  44. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/README.md +0 -0
  45. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/__init__.py +0 -0
  46. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  47. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/__pycache__/__init__.cpython-39.pyc +0 -0
  48. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/__pycache__/conftest.cpython-312-pytest-7.4.4.pyc +0 -0
  49. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/__pycache__/conftest.cpython-39-pytest-8.3.4.pyc +0 -0
  50. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/__pycache__/run_all.cpython-312.pyc +0 -0
  51. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/__pycache__/run_all.cpython-39.pyc +0 -0
  52. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/__pycache__/test_parallel_runner.cpython-312-pytest-7.4.4.pyc +0 -0
  53. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/__pycache__/test_setup_module.cpython-312-pytest-7.4.4.pyc +0 -0
  54. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/conftest.py +0 -0
  55. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/demos/h5_filter_demo.py +0 -0
  56. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/demos/manual_report_example.py +0 -0
  57. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/demos/perf_parallel.py +0 -0
  58. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/e2e/__init__.py +0 -0
  59. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/e2e/__pycache__/__init__.cpython-312.pyc +0 -0
  60. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/e2e/__pycache__/__init__.cpython-39.pyc +0 -0
  61. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/e2e/__pycache__/test_user_flows.cpython-312-pytest-7.4.4.pyc +0 -0
  62. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/e2e/__pycache__/test_user_flows.cpython-39-pytest-8.3.4.pyc +0 -0
  63. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/e2e/test_user_flows.py +0 -0
  64. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/fixtures/test_cases.json +0 -0
  65. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/fixtures/test_cases.yaml +0 -0
  66. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/fixtures/test_cases1.json +0 -0
  67. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/fixtures/test_with_setup.json +0 -0
  68. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/fixtures/test_with_setup.yaml +0 -0
  69. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/file_compare/__pycache__/test_binary_compare.cpython-312-pytest-7.4.4.pyc +0 -0
  70. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/file_compare/__pycache__/test_binary_compare.cpython-39-pytest-8.3.4.pyc +0 -0
  71. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/file_compare/__pycache__/test_h5_compare.cpython-312-pytest-7.4.4.pyc +0 -0
  72. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/file_compare/__pycache__/test_h5_compare.cpython-39-pytest-8.3.4.pyc +0 -0
  73. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/file_compare/__pycache__/test_json_compare.cpython-312-pytest-7.4.4.pyc +0 -0
  74. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/file_compare/__pycache__/test_json_compare.cpython-39-pytest-8.3.4.pyc +0 -0
  75. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/file_compare/__pycache__/test_text_compare.cpython-312-pytest-7.4.4.pyc +0 -0
  76. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/file_compare/__pycache__/test_text_compare.cpython-39-pytest-8.3.4.pyc +0 -0
  77. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/file_compare/test_binary_compare.py +0 -0
  78. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/file_compare/test_h5_compare.py +0 -0
  79. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/file_compare/test_json_compare.py +0 -0
  80. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/file_compare/test_text_compare.py +0 -0
  81. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/parallel/__pycache__/test_parallel_runner.cpython-312-pytest-7.4.4.pyc +0 -0
  82. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/parallel/__pycache__/test_parallel_runner.cpython-39-pytest-8.3.4.pyc +0 -0
  83. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/parallel/test_parallel_runner.py +0 -0
  84. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/path_handling/__pycache__/test_spaces_in_paths.cpython-312-pytest-7.4.4.pyc +0 -0
  85. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/path_handling/__pycache__/test_spaces_in_paths.cpython-39-pytest-8.3.4.pyc +0 -0
  86. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/integration/path_handling/test_spaces_in_paths.py +0 -0
  87. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/run_all.py +0 -0
  88. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/test_report.txt +0 -0
  89. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/unit/core/__pycache__/test_setup.cpython-312-pytest-7.4.4.pyc +0 -0
  90. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/unit/core/__pycache__/test_setup.cpython-39-pytest-8.3.4.pyc +0 -0
  91. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/unit/core/test_setup.py +0 -0
  92. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/unit/runners/__pycache__/test_json_yaml_runner.cpython-312-pytest-7.4.4.pyc +0 -0
  93. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/unit/runners/__pycache__/test_json_yaml_runner.cpython-39-pytest-8.3.4.pyc +0 -0
  94. {cli_test_framework-0.4.2 → cli_test_framework-0.4.4}/tests/unit/runners/test_json_yaml_runner.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cli-test-framework
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: A powerful command line testing framework in Python with setup modules, parallel execution, and file comparison capabilities.
5
5
  Home-page: https://github.com/ozil111/cli-test-framework
6
6
  Author: Xiaotong Wang
@@ -19,7 +19,7 @@ Requires-Python: >=3.9
19
19
  Description-Content-Type: text/markdown
20
20
  Requires-Dist: dukpy==0.5.0
21
21
  Requires-Dist: h5py>=3.8.0
22
- Requires-Dist: numpy>=2.0.1
22
+ Requires-Dist: numpy>=1.22.0
23
23
  Requires-Dist: setuptools>=75.8.0
24
24
  Requires-Dist: wheel>=0.45.1
25
25
  Dynamic: author
@@ -8,7 +8,7 @@ with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
8
8
 
9
9
  setup(
10
10
  name="cli-test-framework",
11
- version="0.4.2",
11
+ version="0.4.4",
12
12
  author="Xiaotong Wang",
13
13
  author_email="xiaotongwang98@gmail.com",
14
14
  description="A powerful command line testing framework in Python with setup modules, parallel execution, and file comparison capabilities.",
@@ -20,7 +20,7 @@ setup(
20
20
  install_requires=[
21
21
  "dukpy==0.5.0",
22
22
  "h5py>=3.8.0",
23
- "numpy>=2.0.1",
23
+ "numpy>=1.22.0",
24
24
  "setuptools>=75.8.0",
25
25
  "wheel>=0.45.1"
26
26
  ],
@@ -5,7 +5,7 @@ This package provides tools for testing command-line applications and scripts
5
5
  with support for parallel execution and advanced file comparison capabilities.
6
6
  """
7
7
 
8
- __version__ = "0.3.7"
8
+ __version__ = "0.4.3"
9
9
  __author__ = "Xiaotong Wang"
10
10
  __email__ = "xiaotongwang98@gmail.com"
11
11
 
@@ -46,6 +46,36 @@ class ParallelJSONRunner(ParallelRunner):
46
46
 
47
47
  print(f"✅ [Resource Manager] Detected {self.total_physical} CPUs. Pool size set to {self.safe_capacity}.")
48
48
 
49
+ def _assign_relative_cpu_cores(self) -> None:
50
+ """
51
+ If cpu_cores is unset, allocate proportionally based on estimated_time/min_memory_mb
52
+ across all cases, relative to available safe_capacity.
53
+ """
54
+ candidates = [c for c in self.test_cases if not (c.resources and "cpu_cores" in c.resources)]
55
+ if not candidates:
56
+ return
57
+
58
+ def weight(case: TestCase) -> float:
59
+ res = case.resources or {}
60
+ est = float(res.get("estimated_time") or 0)
61
+ mem = float(res.get("min_memory_mb") or 0)
62
+ # Simple additive weight; keep >=1 to avoid zero allocation.
63
+ return max(1.0, est / 3600.0 + mem / 4000.0)
64
+
65
+ weights = [weight(c) for c in candidates]
66
+ total_weight = sum(weights)
67
+ if total_weight <= 0:
68
+ total_weight = float(len(weights)) # uniform
69
+
70
+ remaining = self.safe_capacity
71
+ for case, w in zip(candidates, weights):
72
+ share = max(1, int(round(self.safe_capacity * (w / total_weight))))
73
+ share = min(self.safe_capacity, max(1, min(share, remaining))) if remaining > 0 else 1
74
+ if not case.resources:
75
+ case.resources = {}
76
+ case.resources["cpu_cores"] = share
77
+ remaining = max(0, remaining - share)
78
+
49
79
  def load_test_cases(self) -> None:
50
80
  """从JSON文件加载测试用例"""
51
81
  try:
@@ -77,6 +107,9 @@ class ParallelJSONRunner(ParallelRunner):
77
107
  top_case = self.test_cases[0]
78
108
  top_est = (top_case.resources or {}).get("estimated_time", 0)
79
109
  print(f"Heaviest task: {top_case.name} (Est: {top_est}s)")
110
+
111
+ # Relative CPU allocation for cases without explicit cpu_cores
112
+ self._assign_relative_cpu_cores()
80
113
  except Exception as e:
81
114
  sys.exit(f"Failed to load configuration file: {str(e)}")
82
115
 
@@ -11,19 +11,34 @@ def _as_workspace_path(workspace: WorkspaceLike) -> Path:
11
11
  return workspace if isinstance(workspace, Path) else Path(workspace)
12
12
 
13
13
 
14
+ def _resolve_relative_part(part: str, workspace_path: Path) -> str:
15
+ """
16
+ 带标识符的路径解析逻辑:
17
+ 1. 检查标识符 'raw:' -> 如果存在,强行按原样返回(剥离标识符)
18
+ 2. 跳过旗标 (- 开头)
19
+ 3. 跳过纯数字
20
+ 4. 启发式解析其他潜在路径
21
+ """
22
+ if part.startswith("raw:"):
23
+ return part[4:]
24
+
25
+ if part.startswith("-"):
26
+ return part
27
+
28
+ if part.isdigit():
29
+ return part
30
+
31
+ if "." in part or "/" in part or "\\" in part:
32
+ if not Path(part).is_absolute():
33
+ return str(workspace_path / part)
34
+
35
+ return part
36
+
37
+
14
38
  def resolve_paths(args: List[str], workspace: WorkspaceLike) -> List[str]:
15
- """Resolve relative paths in args against the workspace."""
39
+ """根据标识符或启发式规则解析参数列表中的路径"""
16
40
  workspace_path = _as_workspace_path(workspace)
17
- resolved_args = []
18
- for arg in args:
19
- if not arg.startswith("--"):
20
- if not Path(arg).is_absolute():
21
- resolved_args.append(str(workspace_path / arg))
22
- else:
23
- resolved_args.append(arg)
24
- else:
25
- resolved_args.append(arg)
26
- return resolved_args
41
+ return [_resolve_relative_part(arg, workspace_path) for arg in args]
27
42
 
28
43
 
29
44
  def resolve_command(command: str, workspace: WorkspaceLike) -> str:
@@ -71,40 +86,24 @@ def parse_command_string(command_string: str, workspace: WorkspaceLike) -> str:
71
86
  command_part = parts[0]
72
87
  remaining_parts = parts[1:]
73
88
 
74
- if Path(command_part).is_absolute():
75
- resolved_command = command_part
76
- else:
77
- resolved_command = resolve_command(command_part, workspace_path)
89
+ resolved_command = (
90
+ command_part
91
+ if Path(command_part).is_absolute()
92
+ else resolve_command(command_part, workspace_path)
93
+ )
78
94
 
79
- # Preserve scripts passed via "-c" as a single argument to avoid losing quotes
80
95
  resolved_parts = []
81
96
  if "-c" in remaining_parts:
82
97
  c_index = remaining_parts.index("-c")
83
98
  before_c = remaining_parts[:c_index]
84
99
  script_body = " ".join(remaining_parts[c_index + 1 :])
85
100
  for part in before_c:
86
- if part.startswith("-"):
87
- resolved_parts.append(part)
88
- elif ('.' in part or '/' in part or '\\' in part) and not part.isdigit():
89
- if not Path(part).is_absolute():
90
- resolved_parts.append(str(workspace_path / part))
91
- else:
92
- resolved_parts.append(part)
93
- else:
94
- resolved_parts.append(part)
101
+ resolved_parts.append(_resolve_relative_part(part, workspace_path))
95
102
  resolved_parts.append("-c")
96
103
  resolved_parts.append(script_body)
97
104
  else:
98
105
  for part in remaining_parts:
99
- if part.startswith('-'):
100
- resolved_parts.append(part)
101
- elif ('.' in part or '/' in part or '\\' in part) and not part.isdigit():
102
- if not Path(part).is_absolute():
103
- resolved_parts.append(str(workspace_path / part))
104
- else:
105
- resolved_parts.append(part)
106
- else:
107
- resolved_parts.append(part)
106
+ resolved_parts.append(_resolve_relative_part(part, workspace_path))
108
107
 
109
108
  return f"{resolved_command} {' '.join(resolved_parts)}"
110
109
 
@@ -123,26 +122,19 @@ def parse_command_string(command_string: str, workspace: WorkspaceLike) -> str:
123
122
  else:
124
123
  command_part = parts[0]
125
124
  remaining_parts = parts[1:]
126
-
127
125
  resolved_command = resolve_command(command_part, workspace_path)
128
126
 
129
127
  if "-c" in remaining_parts:
130
128
  c_index = remaining_parts.index("-c")
131
129
  before_c = remaining_parts[:c_index]
132
130
  script_body = " ".join(remaining_parts[c_index + 1 :])
133
- resolved_parts = before_c + ["-c", script_body]
131
+ resolved_parts = [
132
+ _resolve_relative_part(p, workspace_path) for p in before_c
133
+ ] + ["-c", script_body]
134
134
  else:
135
- resolved_parts = []
136
- for part in remaining_parts:
137
- if part.startswith('-'):
138
- resolved_parts.append(part)
139
- elif ('.' in part or '/' in part or '\\' in part) and not part.isdigit():
140
- if not Path(part).is_absolute():
141
- resolved_parts.append(str(workspace_path / part))
142
- else:
143
- resolved_parts.append(part)
144
- else:
145
- resolved_parts.append(part)
135
+ resolved_parts = [
136
+ _resolve_relative_part(p, workspace_path) for p in remaining_parts
137
+ ]
146
138
 
147
139
  return f"{resolved_command} {' '.join(resolved_parts)}"
148
140
 
@@ -172,19 +164,10 @@ def _parse_absolute_path_command(command_string: str, workspace: WorkspaceLike)
172
164
 
173
165
  if remaining:
174
166
  remaining_parts = remaining.split()
175
- resolved_parts = []
176
-
177
- for part in remaining_parts:
178
- if part.startswith('-'):
179
- resolved_parts.append(part)
180
- elif ('.' in part or '/' in part or '\\' in part) and not part.isdigit():
181
- if not Path(part).is_absolute():
182
- resolved_parts.append(str(workspace_path / part))
183
- else:
184
- resolved_parts.append(part)
185
- else:
186
- resolved_parts.append(part)
187
-
167
+ resolved_parts = [
168
+ _resolve_relative_part(p, workspace_path)
169
+ for p in remaining_parts
170
+ ]
188
171
  return f"{command_part} {' '.join(resolved_parts)}"
189
172
  else:
190
173
  return command_part
@@ -196,18 +179,9 @@ def _parse_absolute_path_command(command_string: str, workspace: WorkspaceLike)
196
179
  command_part = parts[0]
197
180
  remaining_parts = parts[1:]
198
181
 
199
- resolved_parts = []
200
- for part in remaining_parts:
201
- if part.startswith('-'):
202
- resolved_parts.append(part)
203
- elif ('.' in part or '/' in part or '\\' in part) and not part.isdigit():
204
- if not Path(part).is_absolute():
205
- resolved_parts.append(str(workspace_path / part))
206
- else:
207
- resolved_parts.append(part)
208
- else:
209
- resolved_parts.append(part)
210
-
182
+ resolved_parts = [
183
+ _resolve_relative_part(p, workspace_path) for p in remaining_parts
184
+ ]
211
185
  return f"{command_part} {' '.join(resolved_parts)}"
212
186
 
213
187
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cli-test-framework
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: A powerful command line testing framework in Python with setup modules, parallel execution, and file comparison capabilities.
5
5
  Home-page: https://github.com/ozil111/cli-test-framework
6
6
  Author: Xiaotong Wang
@@ -19,7 +19,7 @@ Requires-Python: >=3.9
19
19
  Description-Content-Type: text/markdown
20
20
  Requires-Dist: dukpy==0.5.0
21
21
  Requires-Dist: h5py>=3.8.0
22
- Requires-Dist: numpy>=2.0.1
22
+ Requires-Dist: numpy>=1.22.0
23
23
  Requires-Dist: setuptools>=75.8.0
24
24
  Requires-Dist: wheel>=0.45.1
25
25
  Dynamic: author
@@ -1,5 +1,5 @@
1
1
  dukpy==0.5.0
2
2
  h5py>=3.8.0
3
- numpy>=2.0.1
3
+ numpy>=1.22.0
4
4
  setuptools>=75.8.0
5
5
  wheel>=0.45.1