Skip to content

Commit 5c89f27

Browse files
committed
move missed tests scripting
1 parent 732c896 commit 5c89f27

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ test-rich:
116116
poetry run pytest --cov-append -m rich
117117

118118
log-tests:
119-
poetry run python -m pytest --collect-only --disable-warnings -q --no-cov | poetry run python -c "from pathlib import Path; import sys; Path('tests.log').unlink(missing_ok=True); open('tests.log', 'a').close(); open('all_tests.log', 'w').writelines(sys.stdin)"
119+
poetry run python -m pytest --collect-only --disable-warnings -q --no-cov | poetry run python -c "from pathlib import Path; import sys; Path('./tests/tests.log').unlink(missing_ok=True); open('./tests/tests.log', 'a').close(); open('./tests/all_tests.log', 'w').writelines(sys.stdin)"
120120

121121
test-all: test-rich test-no-rich
122122
poetry run pip install colorama
@@ -125,7 +125,7 @@ test-all: test-rich test-no-rich
125125
poetry run pytest --cov-append -k test_ctor_params
126126

127127
list-missed-tests: install log-tests test-all
128-
poetry run python ./missed_tests.py
128+
poetry run python ./tests/missed_tests.py
129129

130130
[script("bash")]
131131
test-bash:

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ def pytest_collection_modifyitems(items):
3030

3131
@pytest.hookimpl(tryfirst=True, hookwrapper=True)
3232
def pytest_runtest_makereport(item, call):
33-
log_file = Path("tests.log")
33+
log_file = Path(__file__).parent / "tests.log"
3434
outcome = yield
3535
report = outcome.get_result()
3636
if report.when == "call" and report.outcome == "passed":
3737
if log_file.exists():
38-
with open("tests.log", "a") as log_file:
38+
with open(log_file, "a") as log_file:
3939
log_file.write(f"{item.nodeid}\n")
File renamed without changes.

0 commit comments

Comments
 (0)