MCPcopy Index your code
hub / github.com/RustPython/RustPython / is_test_up_to_date

Function is_test_up_to_date

scripts/update_lib/deps.py:187–204  ·  view source on GitHub ↗

Check if a test is up-to-date, ignoring RustPython TODO markers.

(test_name: str, cpython_prefix: str, lib_prefix: str)

Source from the content-addressed store, hash-verified

185
186
187def is_test_up_to_date(test_name: str, cpython_prefix: str, lib_prefix: str) -> bool:
188 """Check if a test is up-to-date, ignoring RustPython TODO markers."""
189 cpython_path = _get_cpython_test_path(test_name, cpython_prefix)
190 if cpython_path is None:
191 return True
192
193 local_path = _get_local_test_path(cpython_path, lib_prefix)
194 if not local_path.exists():
195 return False
196
197 if cpython_path.is_file():
198 return compare_file_contents(
199 cpython_path, local_path, local_filter=filter_rustpython_todo
200 )
201
202 return compare_dir_contents(
203 cpython_path, local_path, local_filter=filter_rustpython_todo
204 )
205
206
207def count_test_todos(test_name: str, lib_prefix: str) -> int:

Callers 2

compute_test_todo_listFunction · 0.90
format_depsFunction · 0.90

Calls 6

compare_file_contentsFunction · 0.90
compare_dir_contentsFunction · 0.90
_get_cpython_test_pathFunction · 0.85
_get_local_test_pathFunction · 0.85
existsMethod · 0.45
is_fileMethod · 0.45

Tested by

no test coverage detected