Fail on all platforms, print paths

This commit is contained in:
Bruno Oliveira 2021-11-20 11:05:04 -03:00
parent 992f8cb668
commit a1bc348603
1 changed files with 10 additions and 6 deletions

View File

@ -1749,7 +1749,7 @@ class TestPyCacheDir:
} }
) )
result = pytester.runpytest() result = pytester.runpytest()
pprint.pprint(list(tmp_path.glob("**"))) pprint.pprint(list(tmp_path.glob("**/*.*")))
assert result.ret == 0 assert result.ret == 0
@ -1761,12 +1761,16 @@ class TestPyCacheDir:
# test file: rewritten, custom pytest cache tag # test file: rewritten, custom pytest cache tag
test_foo_pyc = get_cache_dir(test_foo) / ("test_foo" + PYC_TAIL) test_foo_pyc = get_cache_dir(test_foo) / ("test_foo" + PYC_TAIL)
assert test_foo_pyc.is_file() assert test_foo_pyc.is_file()
assert 0, "lets fail on purpose to see paths in all platforms"
# normal file: not touched by pytest, normal cache tag # # normal file: not touched by pytest, normal cache tag
bar_init_pyc = get_cache_dir(bar_init) / "__init__.{cache_tag}.pyc".format( # bar_init_pyc = (
cache_tag=sys.implementation.cache_tag # get_cache_dir( # type:ignore[unreachable]
) # bar_init
assert bar_init_pyc.is_file() # )
# / f"__init__.{sys.implementation.cache_tag}.pyc"
# )
# assert bar_init_pyc.is_file()
class TestReprSizeVerbosity: class TestReprSizeVerbosity: