diff options
author | holger krekel (rather uses bitbucket/hpk42) <holger.krekel@gmail.com> | 2015-06-23 16:53:22 +0200 |
---|---|---|
committer | holger krekel (rather uses bitbucket/hpk42) <holger.krekel@gmail.com> | 2015-06-23 16:53:22 +0200 |
commit | 08613b621e50ad5ad4529833e5d54ca2ceba6851 (patch) | |
tree | ea171ccd554a3b6c4a2bf63a66c6c2797383eef7 /testing/test_conftest.py | |
parent | ee40ea5f6d9d6aec0829faa20229f6271edac843 (diff) | |
parent | f78b6df8bc2d8df037a7e1f6496e87cb8d99ba36 (diff) | |
download | pytest-08613b621e50ad5ad4529833e5d54ca2ceba6851.tar.gz |
Merge pull request #799 from pytest-dev/noconftest
Add a --noconftest option.
Diffstat (limited to 'testing/test_conftest.py')
-rw-r--r-- | testing/test_conftest.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testing/test_conftest.py b/testing/test_conftest.py index 4f967c915..4791d6f61 100644 --- a/testing/test_conftest.py +++ b/testing/test_conftest.py @@ -24,6 +24,7 @@ def conftest_setinitial(conftest, args, confcutdir=None): def __init__(self): self.file_or_dir = args self.confcutdir = str(confcutdir) + self.noconftest = False conftest._set_initial_conftests(Namespace()) class TestConftestValueAccessGlobal: @@ -162,6 +163,11 @@ def test_conftest_confcutdir(testdir): result.stdout.fnmatch_lines(["*--xyz*"]) assert 'warning: could not load initial' not in result.stdout.str() +def test_no_conftest(testdir): + testdir.makeconftest("assert 0") + result = testdir.runpytest("--noconftest") + assert result.ret == 0 + def test_conftest_existing_resultlog(testdir): x = testdir.mkdir("tests") x.join("conftest.py").write(py.code.Source(""" |