You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm currently working on packaging 0.6.0 for Arch Linux. In the packaging environment we usually run the test suite of upstream projects to have easy integration testing upon upgrades.
Unfortunately the mentioned test fails and I'm not sure why:
=================================== FAILURES ===================================
__________________ test_time_rotation_reopening_native[False] __________________
tmpdir_local = PosixPath('tmpwuh0s_ls'), delay = False
> ???
E AssertionError: assert 1 == 2
E + where 1 = len([PosixPath('tmpwuh0s_ls/test.log')])
E + where [PosixPath('tmpwuh0s_ls/test.log')] = list(<generator object Path.iterdir at 0x6073b9e53300>)
E + where <generator object Path.iterdir at 0x6073b9e53300> = <bound method Path.iterdir of PosixPath('tmpwuh0s_ls')>()
E + where <bound method Path.iterdir of PosixPath('tmpwuh0s_ls')> = PosixPath('tmpwuh0s_ls').iterdir
tests/test_filesink_rotation.py:292: AssertionError
__________________ test_time_rotation_reopening_native[True] ___________________
tmpdir_local = PosixPath('tmprccpxuyr'), delay = True
@pytest.mark.parametrize("delay", [False, True])
def test_time_rotation_reopening_native(tmpdir_local, delay):
filepath = str(tmpdir_local / "test.log")
i = logger.add(filepath, format="{message}", delay=delay, rotation="1 s")
logger.info("1")
time.sleep(0.75)
logger.info("2")
logger.remove(i)
i = logger.add(filepath, format="{message}", delay=delay, rotation="1 s")
logger.info("3")
assert len(list(tmpdir_local.iterdir())) == 1
assert (tmpdir_local / "test.log").read_text() == "1\n2\n3\n"
time.sleep(0.5)
logger.info("4")
> assert len(list(tmpdir_local.iterdir())) == 2
E AssertionError: assert 1 == 2
E + where 1 = len([PosixPath('tmprccpxuyr/test.log')])
E + where [PosixPath('tmprccpxuyr/test.log')] = list(<generator object Path.iterdir at 0x6073b9d40c80>)
E + where <generator object Path.iterdir at 0x6073b9d40c80> = <bound method Path.iterdir of PosixPath('tmprccpxuyr')>()
E + where <bound method Path.iterdir of PosixPath('tmprccpxuyr')> = PosixPath('tmprccpxuyr').iterdir
tests/test_filesink_rotation.py:292: AssertionError
=========================== short test summary info ============================
FAILED tests/test_filesink_rotation.py::test_time_rotation_reopening_native[False]
FAILED tests/test_filesink_rotation.py::test_time_rotation_reopening_native[True]
================== 2 failed, 1349 passed, 1 skipped in 33.03s ==================
Maybe you have a clue? :)
This is with
pytest 7.1.2
python 3.10.4
The text was updated successfully, but these errors were encountered:
I refactored the test a little bit. I increased the sleep times and also added a check to skip the test if the platform does not seem to support getting/setting file creation time.
If you're still experiencing the issue, please re-open this ticket so we can investigate it further. 👍
Hi! I'm currently working on packaging 0.6.0 for Arch Linux. In the packaging environment we usually run the test suite of upstream projects to have easy integration testing upon upgrades.
Unfortunately the mentioned test fails and I'm not sure why:
Maybe you have a clue? :)
This is with
The text was updated successfully, but these errors were encountered: