Buckets:

download
raw
1.91 kB
#!/usr/bin/env python3
"""Find hanging tests by running each one individually."""
import subprocess
import sys
from pathlib import Path
import glob
import time
def test_file(test_file):
"""Test a single file with timeout."""
print(f"Testing {test_file}...", end=" ", flush=True)
try:
start = time.time()
result = subprocess.run(
[sys.executable, "-m", "pytest", test_file, "-q", "--tb=short", "--timeout=5"],
capture_output=True,
text=True,
timeout=10, # Hard timeout
cwd="/home/Memo1981/MyWork-AI"
)
duration = time.time() - start
if result.returncode == 0:
print(f"โœ… PASS ({duration:.1f}s)")
return "pass"
else:
print(f"โŒ FAIL ({duration:.1f}s)")
return "fail"
except subprocess.TimeoutExpired:
print(f"๐Ÿ”ฅ HANG (>10s)")
return "hang"
except Exception as e:
print(f"๐Ÿ’ฅ ERROR: {e}")
return "error"
if __name__ == "__main__":
test_files = sorted(glob.glob("/home/Memo1981/MyWork-AI/tests/test_*.py"))
passed = []
failed = []
hanging = []
errors = []
for test_file_path in test_files:
result = test_file(test_file_path)
if result == "pass":
passed.append(test_file)
elif result == "fail":
failed.append(test_file)
elif result == "hang":
hanging.append(test_file)
else:
errors.append(test_file)
print(f"\n๐Ÿ“Š RESULTS:")
print(f"โœ… Passed: {len(passed)}")
print(f"โŒ Failed: {len(failed)}")
print(f"๐Ÿ”ฅ Hanging: {len(hanging)}")
print(f"๐Ÿ’ฅ Errors: {len(errors)}")
if hanging:
print(f"\n๐Ÿ”ฅ Hanging tests to remove:")
for test in hanging:
print(f" {Path(test).name}")

Xet Storage Details

Size:
1.91 kB
ยท
Xet hash:
8049d140f79fb1cb455fcb81ddc73d306e2fdba926d2760595b6df473a49c78a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.