diff options
| author | Bernát Gábor <bgabor8@bloomberg.net> | 2020-05-22 12:41:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-22 12:41:32 +0100 |
| commit | a8717bf6ac3375d7f26738189c32e3bae04d280a (patch) | |
| tree | 58343e92ebc58b74246fb9a021eb29e3fa0bdfbe | |
| parent | c3643114132be6aa167ce9178823b62326def7e1 (diff) | |
| download | virtualenv-a8717bf6ac3375d7f26738189c32e3bae04d280a.tar.gz | |
Add 3.9 on Linux to the test suite (#1839)
| -rw-r--r-- | azure-pipelines.yml | 10 | ||||
| -rw-r--r-- | setup.cfg | 3 | ||||
| -rw-r--r-- | tests/integration/test_zipapp.py | 2 | ||||
| -rw-r--r-- | tests/unit/activation/test_xonsh.py | 3 | ||||
| -rw-r--r-- | tests/unit/discovery/test_py_spec.py | 2 | ||||
| -rw-r--r-- | tox.ini | 2 |
6 files changed, 16 insertions, 6 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9315a35..2381fb9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -36,6 +36,8 @@ jobs: - template: run-tox-env.yml@tox parameters: jobs: + py39: + image: [linux] py38: image: [linux, vs2017-win2016, macOs] py37: @@ -92,13 +94,13 @@ jobs: displayName: tox uses this virtualenv (eat our own dogfood) condition: not(and(succeeded(), eq(variables['image_name'], 'windows'), in(variables['TOXENV'], 'pypy3'))) - script: 'sudo apt-get update -y && sudo apt-get install fish csh' - condition: and(succeeded(), eq(variables['image_name'], 'linux'), in(variables['TOXENV'], 'py38', 'py37', 'py36', 'py35', 'py27', 'pypy', 'pypy3')) + condition: and(succeeded(), eq(variables['image_name'], 'linux'), in(variables['TOXENV'], 'py39', 'py38', 'py37', 'py36', 'py35', 'py27', 'pypy', 'pypy3')) displayName: install fish and csh via apt-get - script: 'brew update -vvv && brew install fish tcsh' - condition: and(succeeded(), eq(variables['image_name'], 'macOs'), in(variables['TOXENV'], 'py38', 'py37', 'py36', 'py35', 'py27', 'pypy', 'pypy3')) + condition: and(succeeded(), eq(variables['image_name'], 'macOs'), in(variables['TOXENV'], 'py39', 'py38', 'py37', 'py36', 'py35', 'py27', 'pypy', 'pypy3')) displayName: install fish and csh via brew - task: UsePythonVersion@0 - condition: and(succeeded(), in(variables['TOXENV'], 'py38', 'py37', 'py36', 'py35')) + condition: and(succeeded(), in(variables['TOXENV'], 'py39', 'py38', 'py37', 'py36', 'py35')) displayName: provision cpython 2 inputs: versionSpec: '2.7' @@ -122,7 +124,7 @@ jobs: displayName: Install Visual C++ for Python 2.7 coverage: with_toxenv: 'coverage' # generate .tox/.coverage, .tox/coverage.xml after test run - for_envs: [py38, py37, py36, py35, py27, pypy, pypy3] + for_envs: [py39, py38, py37, py36, py35, py27, pypy, pypy3] - ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}: - template: publish-pypi.yml@tox @@ -97,7 +97,8 @@ testing = pytest-mock >= 2 pytest-env >= 0.6.2 pytest-randomly >= 1 - pytest-timeout + pytest-timeout >= 1 + flaky >= 3 xonsh >= 0.9.16; python_version > '3.4' [options.package_data] diff --git a/tests/integration/test_zipapp.py b/tests/integration/test_zipapp.py index b29c41e..605496e 100644 --- a/tests/integration/test_zipapp.py +++ b/tests/integration/test_zipapp.py @@ -5,6 +5,7 @@ import subprocess import sys import pytest +from flaky import flaky from virtualenv.discovery.py_info import PythonInfo from virtualenv.run import cli_run @@ -83,6 +84,7 @@ def call_zipapp(zipapp, monkeypatch, tmp_path, zipapp_test_env, temp_app_data): return _run +@flaky(max_runs=2, min_passes=1) def test_zipapp_help(call_zipapp, capsys): call_zipapp("-h") out, err = capsys.readouterr() diff --git a/tests/unit/activation/test_xonsh.py b/tests/unit/activation/test_xonsh.py index e9cc841..f2ed608 100644 --- a/tests/unit/activation/test_xonsh.py +++ b/tests/unit/activation/test_xonsh.py @@ -10,6 +10,9 @@ from virtualenv.info import IS_PYPY, PY3 @pytest.mark.slow @pytest.mark.skipif(sys.platform == "win32" and IS_PYPY and PY3, reason="xonsh on Windows blocks indefinitely") +@pytest.mark.xfail( + condition=sys.version_info[0:2] == (3, 9), strict=True, reason="https://bugs.python.org/issue40726", +) def test_xonsh(activation_tester_class, activation_tester): class Xonsh(activation_tester_class): def __init__(self, session): diff --git a/tests/unit/discovery/test_py_spec.py b/tests/unit/discovery/test_py_spec.py index 4454127..52154f1 100644 --- a/tests/unit/discovery/test_py_spec.py +++ b/tests/unit/discovery/test_py_spec.py @@ -95,6 +95,8 @@ def _version_not_satisfies_pairs(): for o in [1, -1]: temp = copy(sat_ver) temp[patch] += o + if temp[patch] < 0: + continue sat = ".".join(str(i) for i in temp) target.add((req, sat)) return sorted(target) @@ -116,7 +116,7 @@ force_grid_wrap = 0 line_length = 120 known_standard_library = ConfigParser known_first_party = virtualenv -known_third_party = _subprocess,appdirs,coverage,distlib,docutils,filelock,git,packaging,pytest,setuptools,six,sphinx,sphinx_rtd_theme,sphinxarg +known_third_party = _subprocess,appdirs,coverage,distlib,docutils,filelock,flaky,git,packaging,pytest,setuptools,six,sphinx,sphinx_rtd_theme,sphinxarg [flake8] max-complexity = 22 |
