098d80a9c6
- Update to version 0.8.3 - Cherry-pick upstream patch to fix testsuite + add-missing-conftest.patch - Update BuildRequires from setup.py OBS-URL: https://build.opensuse.org/request/show/650196 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-watchdog?expand=0&rev=12
27 lines
739 B
Diff
27 lines
739 B
Diff
diff -Nru watchdog-0.9.0.old/tests/conftest.py watchdog-0.9.0/tests/conftest.py
|
|
--- watchdog-0.9.0.old/tests/conftest.py 1970-01-01 01:00:00.000000000 +0100
|
|
+++ watchdog-0.9.0/tests/conftest.py 2018-11-19 13:54:38.883980668 +0100
|
|
@@ -0,0 +1,22 @@
|
|
+from functools import partial
|
|
+import os
|
|
+import pytest
|
|
+from tests import shell
|
|
+
|
|
+
|
|
+@pytest.fixture()
|
|
+def tmpdir(request):
|
|
+ path = os.path.realpath(shell.mkdtemp())
|
|
+ def finalizer():
|
|
+ shell.rm(path, recursive=True)
|
|
+ request.addfinalizer(finalizer)
|
|
+ return path
|
|
+
|
|
+
|
|
+@pytest.fixture()
|
|
+def p(tmpdir, *args):
|
|
+ """
|
|
+ Convenience function to join the temporary directory path
|
|
+ with the provided arguments.
|
|
+ """
|
|
+ return partial(os.path.join, tmpdir)
|