summaryrefslogtreecommitdiff
path: root/testing/example_scripts
diff options
context:
space:
mode:
authorBruno Oliveira <nicoddemus@gmail.com>2018-10-20 09:44:42 -0300
committerBruno Oliveira <nicoddemus@gmail.com>2018-10-20 09:44:42 -0300
commit02ae7d85318e9e2a02ab292e37123000d694308a (patch)
tree1ab396f6675e86cc4d6d04385b78e73708a25818 /testing/example_scripts
parentb0eed7b56c770a0269ac8692f54778e7f63f8eec (diff)
downloadpytest-02ae7d85318e9e2a02ab292e37123000d694308a.tar.gz
Improve error message when a recursive dependency between fixtures is detected
Fix #2909
Diffstat (limited to 'testing/example_scripts')
-rw-r--r--testing/example_scripts/fixtures/fill_fixtures/test_detect_recursive_dependency_error.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/example_scripts/fixtures/fill_fixtures/test_detect_recursive_dependency_error.py b/testing/example_scripts/fixtures/fill_fixtures/test_detect_recursive_dependency_error.py
new file mode 100644
index 000000000..d1efcbb33
--- /dev/null
+++ b/testing/example_scripts/fixtures/fill_fixtures/test_detect_recursive_dependency_error.py
@@ -0,0 +1,15 @@
+import pytest
+
+
+@pytest.fixture
+def fix1(fix2):
+ return 1
+
+
+@pytest.fixture
+def fix2(fix1):
+ return 1
+
+
+def test(fix1):
+ pass