summaryrefslogtreecommitdiff
path: root/testing/example_scripts
diff options
context:
space:
mode:
authorBruno Oliveira <nicoddemus@gmail.com>2018-08-25 11:09:43 -0300
committerBruno Oliveira <nicoddemus@gmail.com>2018-08-25 11:18:52 -0300
commitde6f2c0336a03e34ed5b060f13c3932e9710db14 (patch)
treef4e50ee5c9ebc740790ba487d734fc1d578e69c5 /testing/example_scripts
parentbe4b359c7430eef2b18041e0dab2fa5e4ee7ec22 (diff)
downloadpytest-de6f2c0336a03e34ed5b060f13c3932e9710db14.tar.gz
Collect tests from __init__.py files if they match 'python_files'
Fix #3773
Diffstat (limited to 'testing/example_scripts')
-rw-r--r--testing/example_scripts/collect/collect_init_tests/pytest.ini2
-rw-r--r--testing/example_scripts/collect/collect_init_tests/tests/__init__.py2
-rw-r--r--testing/example_scripts/collect/collect_init_tests/tests/test_foo.py2
3 files changed, 6 insertions, 0 deletions
diff --git a/testing/example_scripts/collect/collect_init_tests/pytest.ini b/testing/example_scripts/collect/collect_init_tests/pytest.ini
new file mode 100644
index 000000000..7c4795540
--- /dev/null
+++ b/testing/example_scripts/collect/collect_init_tests/pytest.ini
@@ -0,0 +1,2 @@
+[pytest]
+python_files = *.py
diff --git a/testing/example_scripts/collect/collect_init_tests/tests/__init__.py b/testing/example_scripts/collect/collect_init_tests/tests/__init__.py
new file mode 100644
index 000000000..9cd366295
--- /dev/null
+++ b/testing/example_scripts/collect/collect_init_tests/tests/__init__.py
@@ -0,0 +1,2 @@
+def test_init():
+ pass
diff --git a/testing/example_scripts/collect/collect_init_tests/tests/test_foo.py b/testing/example_scripts/collect/collect_init_tests/tests/test_foo.py
new file mode 100644
index 000000000..8f2d73cfa
--- /dev/null
+++ b/testing/example_scripts/collect/collect_init_tests/tests/test_foo.py
@@ -0,0 +1,2 @@
+def test_foo():
+ pass