Skip flaky test

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
This commit is contained in:
Dan Ryan
2020-04-22 17:28:19 -04:00
parent e1fefb617a
commit 73edea10a0
2 changed files with 8 additions and 8 deletions
+4
View File
@@ -129,6 +129,10 @@ def pytest_runtest_setup(item):
sys.version_info >= (3, 7)
):
pytest.skip('test only runs on python < 3.7')
if item.get_closest_marker('skip_py36') is not None and (
sys.version_info[:2] == (3, 6)
):
pytest.skip('test is skipped on python 3.6')
@pytest.fixture
+4 -8
View File
@@ -131,7 +131,7 @@ funcsigs = "*"
@pytest.mark.markers
@pytest.mark.complex
@pytest.mark.py3_only
@pytest.mark.lte_py36
@pytest.mark.skip_py36
def test_resolver_unique_markers(PipenvInstance):
"""vcrpy has a dependency on `yarl` which comes with a marker
of 'python version in "3.4, 3.5, 3.6" - this marker duplicates itself:
@@ -141,17 +141,13 @@ def test_resolver_unique_markers(PipenvInstance):
This verifies that we clean that successfully.
"""
with PipenvInstance(chdir=True) as p:
c = p.pipenv('install vcrpy==2.0.1 --verbose')
c = p.pipenv('install vcrpy==2.0.1')
assert c.return_code == 0
print(c.out, file=sys.stderr)
print(c.err, file=sys.stderr)
c = p.pipenv('lock --verbose')
print(c.out, file=sys.stderr)
print(c.err, file=sys.stderr)
c = p.pipenv('lock')
assert c.return_code == 0
assert 'yarl' in p.lockfile['default']
yarl = p.lockfile['default']['yarl']
assert 'markers' in yarl, os.listdir(os.path.expanduser(os.environ.get("PIPENV_CACHE_DIR", "~/.cache/pipenv")))
assert 'markers' in yarl
# Two possible marker sets are ok here
assert yarl['markers'] in [
"python_version in '3.4, 3.5, 3.6'",