summaryrefslogtreecommitdiffstats
path: root/tests/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644
index 0000000..c6b256d
--- /dev/null
+++ b/tests/conftest.py
@@ -0,0 +1,22 @@
+import copy
+import sys
+
+import pytest
+
+
+def pytest_addoption(parser):
+ parser.addoption(
+ "--repeat", type=int, default=1, help="repeat the operation multiple times"
+ )
+
+
+@pytest.fixture(scope="session")
+def repeat(request):
+ return request.config.getoption("repeat")
+
+
+@pytest.fixture
+def reset_sys_path():
+ original = copy.deepcopy(sys.path)
+ yield
+ sys.path = original