Commit 53836669 authored by Muyang Li's avatar Muyang Li
Browse files

chore: test support retries

parent 16f4161e
...@@ -21,7 +21,7 @@ def run_all_tests(): ...@@ -21,7 +21,7 @@ def run_all_tests():
failed_tests = [] failed_tests = []
for test_file in test_files: for test_file in test_files:
print(f"Running {test_file} ...") print(f"Running {test_file} ...")
result = subprocess.run(["pytest", test_file]) result = subprocess.run(["pytest", "--reruns", "2", "--reruns-delay", "0", test_file])
if result.returncode != 0: if result.returncode != 0:
print(f"Test failed: {test_file}") print(f"Test failed: {test_file}")
failed_tests.append(test_file) failed_tests.append(test_file)
......
...@@ -59,9 +59,8 @@ Running the Tests ...@@ -59,9 +59,8 @@ Running the Tests
.. code-block:: shell .. code-block:: shell
HF_TOKEN=$YOUR_HF_TOKEN pytest -v tests/flux/test_flux_memory.py HF_TOKEN=$YOUR_HF_TOKEN pytest -v tests/flux/test_flux_examples.py
HF_TOKEN=$YOUR_HF_TOKEN pytest -v tests/flux --ignore=tests/flux/test_flux_memory.py HF_TOKEN=$YOUR_HF_TOKEN python .github/workflows/run_all_tests.py
HF_TOKEN=$YOUR_HF_TOKEN pytest -v tests/sana
.. note:: .. note::
......
...@@ -10,3 +10,4 @@ insightface ...@@ -10,3 +10,4 @@ insightface
opencv-python opencv-python
facexlib facexlib
onnxruntime onnxruntime
pytest-rerunfailures
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment