+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-livereload-2.6.3-9.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-livereload-2.6.3-9.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.8.16, pytest-7.2.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/python-livereload-2.6.3
collected 5 items
tests/test_watcher.py ....F [100%]
=================================== FAILURES ===================================
_____________________ TestWatcher.test_watch_multiple_dirs _____________________
self = <tests.test_watcher.TestWatcher testMethod=test_watch_multiple_dirs>
def test_watch_multiple_dirs(self):
first_dir = os.path.join(tmpdir, 'first')
second_dir = os.path.join(tmpdir, 'second')
watcher = Watcher()
os.mkdir(first_dir)
watcher.watch(first_dir)
assert watcher.examine() == (None, None)
first_path = os.path.join(first_dir, 'foo')
with open(first_path, 'w') as f:
f.write('')
assert watcher.examine() == (first_path, None)
assert watcher.examine() == (None, None)
os.mkdir(second_dir)
watcher.watch(second_dir)
assert watcher.examine() == (None, None)
second_path = os.path.join(second_dir, 'bar')
with open(second_path, 'w') as f:
f.write('')
assert watcher.examine() == (second_path, None)
assert watcher.examine() == (None, None)
with open(first_path, 'a') as f:
f.write('foo')
> assert watcher.examine() == (first_path, None)
E AssertionError: assert (None, None) == ('/home/tkloc...st/foo', None)
E At index 0 diff: None != '/home/tkloczko/rpmbuild/BUILD/python-livereload-2.6.3/tests/tmp/first/foo'
E Use -v to get more diff
tests/test_watcher.py:147: AssertionError
=========================== short test summary info ============================
FAILED tests/test_watcher.py::TestWatcher::test_watch_multiple_dirs - Asserti...
========================= 1 failed, 4 passed in 3.16s ==========================
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolationbuildwith--no-isolationI'm using during all processes only locally installed modulescut off from access to the public network(pytest is executed with-m "not network")Here is pytest output:
Details
Here is list of installed modules in build env
Details