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)
|