Merge pull request #570 from nicoddemus/fix-config-init

This commit is contained in:
Bruno Oliveira
2020-08-05 19:44:55 -03:00
committed by GitHub
3 changed files with 3 additions and 10 deletions

View File

@@ -40,6 +40,8 @@ jobs:
env: TOXENV=py36-pytestlatest
- python: "3.7"
env: TOXENV=py37-pytestlatest
- python: "3.9-dev"
env: TOXENV=py39-pytestlatest
- python: "3.8"
env: TOXENV=py38-pytestmaster

View File

@@ -1,6 +1,5 @@
import os
import re
import sys
import textwrap
import py
@@ -577,16 +576,8 @@ def test_fixture_teardown_failure(testdir):
assert result.ret
@pytest.mark.skipif(
sys.version_info[:2] == (2, 7),
reason="Only available in pytest 5.0+ (Python 3 only)",
)
def test_config_initialization(testdir, monkeypatch, pytestconfig):
"""Ensure workers and master are initialized consistently. Integration test for #445"""
if not hasattr(pytestconfig, "invocation_params"):
pytest.skip(
"requires pytest >=5.1 (config has no attribute 'invocation_params')"
)
testdir.makepyfile(
**{
"dir_a/test_foo.py": """

View File

@@ -1,7 +1,7 @@
[tox]
envlist=
linting
py{35,36,37,38}-pytestlatest
py{35,36,37,38,39}-pytestlatest
py38-pytestmaster
[testenv]