[Python-modules-commits] [tox] 31/69: Various fixes to get some semblance of the test suite passing at

Barry Warsaw barry at moszumanska.debian.org
Fri Sep 5 23:26:26 UTC 2014


This is an automated email from the git hooks/post-receive script.

barry pushed a commit to branch master
in repository tox.

commit c3bd1cee9181a6ff19ef09c7fb90ce1ba214d9ac
Author: Barry Warsaw <barry at debian.org>
Date:   Tue Jun 17 16:05:44 2014 -0400

    Various fixes to get some semblance of the test suite passing at
    
     package build time.  This isn't perfect because tox's tests depend on tox
     being built and installed - a catch 22.  However, we can do a lot and there
     are DEP-8 tests to handle the rest of it.
    Forwarded: not-needed
    
    Patch-Name: build-time-tests.patch
---
 tests/test_config.py    |  1 +
 tests/test_z_cmdline.py | 25 +++++++++++++++++++++++++
 tox.ini                 |  2 +-
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/tests/test_config.py b/tests/test_config.py
index b8d0aa3..3859770 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -1101,6 +1101,7 @@ class TestParseEnv:
         config = newconfig([], inisource)
         assert config.envconfigs['hello'].recreate
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 class TestCmdInvocation:
     def test_help(self, cmd):
         result = cmd.run("tox", "-h")
diff --git a/tests/test_z_cmdline.py b/tests/test_z_cmdline.py
index 343c142..76cfe69 100644
--- a/tests/test_z_cmdline.py
+++ b/tests/test_z_cmdline.py
@@ -1,3 +1,4 @@
+import os
 import tox
 import py
 import pytest
@@ -179,6 +180,7 @@ def XXX_test_package(cmd, initproj):
         "*created sdist package at*",
     ])
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_minversion(cmd, initproj):
     initproj("interp123-0.5", filedefs={
         'tests': {'test_hello.py': "def test_hello(): pass"},
@@ -193,6 +195,7 @@ def test_minversion(cmd, initproj):
     ])
     assert result.ret
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_unknown_interpreter_and_env(cmd, initproj):
     initproj("interp123-0.5", filedefs={
         'tests': {'test_hello.py': "def test_hello(): pass"},
@@ -215,6 +218,7 @@ def test_unknown_interpreter_and_env(cmd, initproj):
         "*ERROR*unknown*",
     ])
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_unknown_interpreter(cmd, initproj):
     initproj("interp123-0.5", filedefs={
         'tests': {'test_hello.py': "def test_hello(): pass"},
@@ -231,6 +235,7 @@ def test_unknown_interpreter(cmd, initproj):
         "*ERROR*InterpreterNotFound*xyz_unknown_interpreter*",
     ])
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_unknown_dep(cmd, initproj):
     initproj("dep123-0.7", filedefs={
         'tests': {'test_hello.py': "def test_hello(): pass"},
@@ -246,6 +251,7 @@ def test_unknown_dep(cmd, initproj):
         "*ERROR*could not install*qweqwe123*",
     ])
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_unknown_environment(cmd, initproj):
     initproj("env123-0.7", filedefs={
         'tox.ini': ''
@@ -256,6 +262,7 @@ def test_unknown_environment(cmd, initproj):
         "*ERROR*unknown*environment*qpwoei*",
     ])
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_skip_sdist(cmd, initproj):
     initproj("pkg123-0.7", filedefs={
         'tests': {'test_hello.py': "def test_hello(): pass"},
@@ -273,6 +280,7 @@ def test_skip_sdist(cmd, initproj):
     result = cmd.run("tox", )
     assert result.ret == 0
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_minimal_setup_py_empty(cmd, initproj):
     initproj("pkg123-0.7", filedefs={
         'tests': {'test_hello.py': "def test_hello(): pass"},
@@ -288,6 +296,7 @@ def test_minimal_setup_py_empty(cmd, initproj):
         "*ERROR*empty*",
     ])
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_minimal_setup_py_comment_only(cmd, initproj):
     initproj("pkg123-0.7", filedefs={
         'tests': {'test_hello.py': "def test_hello(): pass"},
@@ -304,6 +313,7 @@ def test_minimal_setup_py_comment_only(cmd, initproj):
         "*ERROR*empty*",
     ])
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_minimal_setup_py_non_functional(cmd, initproj):
     initproj("pkg123-0.7", filedefs={
         'tests': {'test_hello.py': "def test_hello(): pass"},
@@ -321,6 +331,7 @@ def test_minimal_setup_py_non_functional(cmd, initproj):
         "*ERROR*check setup.py*",
     ])
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_sdist_fails(cmd, initproj):
     initproj("pkg123-0.7", filedefs={
         'tests': {'test_hello.py': "def test_hello(): pass"},
@@ -336,6 +347,7 @@ def test_sdist_fails(cmd, initproj):
         "*FAIL*could not package project*",
     ])
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_package_install_fails(cmd, initproj):
     initproj("pkg123-0.7", filedefs={
         'tests': {'test_hello.py': "def test_hello(): pass"},
@@ -362,6 +374,7 @@ def test_package_install_fails(cmd, initproj):
 
 
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 class TestToxRun:
     @pytest.fixture
     def example123(self, initproj):
@@ -423,6 +436,7 @@ class TestToxRun:
         ])
 
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_develop(initproj, cmd):
     initproj("example123", filedefs={'tox.ini': """
     """})
@@ -430,6 +444,7 @@ def test_develop(initproj, cmd):
     assert not result.ret
     assert "sdist-make" not in result.stdout.str()
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_usedevelop(initproj, cmd):
     initproj("example123", filedefs={'tox.ini': """
             [testenv]
@@ -439,6 +454,7 @@ def test_usedevelop(initproj, cmd):
     assert not result.ret
     assert "sdist-make" not in result.stdout.str()
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_usedevelop_mixed(initproj, cmd):
     initproj("example123", filedefs={'tox.ini': """
             [testenv:devenv]
@@ -457,6 +473,7 @@ def test_usedevelop_mixed(initproj, cmd):
     assert not result.ret
     assert "sdist-make" in result.stdout.str()
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_test_usedevelop(cmd, initproj):
     initproj("example123-0.5", filedefs={
         'tests': {'test_hello.py': """
@@ -510,6 +527,7 @@ def test_test_usedevelop(cmd, initproj):
     ])
 
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_test_piphelp(initproj, cmd):
     initproj("example123", filedefs={'tox.ini': """
         # content of: tox.ini
@@ -523,6 +541,7 @@ def test_test_piphelp(initproj, cmd):
     result = cmd.run("tox")
     assert not result.ret
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_notest(initproj, cmd):
     initproj("example123", filedefs={'tox.ini': """
         # content of: tox.ini
@@ -541,6 +560,7 @@ def test_notest(initproj, cmd):
         "*py26*reusing*",
     ])
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_PYC(initproj, cmd, monkeypatch):
     initproj("example123", filedefs={'tox.ini': ''})
     monkeypatch.setenv("PYTHONDOWNWRITEBYTECODE", 1)
@@ -550,6 +570,7 @@ def test_PYC(initproj, cmd, monkeypatch):
         "*create*",
     ])
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_env_VIRTUALENV_PYTHON(initproj, cmd, monkeypatch):
     initproj("example123", filedefs={'tox.ini': ''})
     monkeypatch.setenv("VIRTUALENV_PYTHON", '/FOO')
@@ -559,6 +580,7 @@ def test_env_VIRTUALENV_PYTHON(initproj, cmd, monkeypatch):
         "*create*",
     ])
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_sdistonly(initproj, cmd):
     initproj("example123", filedefs={'tox.ini': """
     """})
@@ -569,6 +591,7 @@ def test_sdistonly(initproj, cmd):
     ])
     assert "virtualenv" not in result.stdout.str()
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_separate_sdist_no_sdistfile(cmd, initproj):
     distshare = cmd.tmpdir.join("distshare")
     initproj("pkg123-0.7", filedefs={
@@ -583,6 +606,7 @@ def test_separate_sdist_no_sdistfile(cmd, initproj):
     assert len(l) == 1
     sdistfile = l[0]
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 def test_separate_sdist(cmd, initproj):
     distshare = cmd.tmpdir.join("distshare")
     initproj("pkg123-0.7", filedefs={
@@ -625,6 +649,7 @@ def test_installpkg(tmpdir, newconfig):
     sdist_path = session.sdist()
     assert sdist_path == p
 
+ at pytest.mark.skipif(os.environ.get('DEB_SKIP_TOX_TESTS'))
 @pytest.mark.xfail("sys.platform == 'win32' and sys.version_info < (2,6)",
                    reason="test needs better impl")
 def test_envsitepackagesdir(cmd, initproj):
diff --git a/tox.ini b/tox.ini
index f2fc791..c1fc9a1 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,7 +5,7 @@ envlist=py27,py33,py26,py32,pypy
 commands=echo {posargs}
 
 [testenv]
-commands=py.test  --junitxml={envlogdir}/junit-{envname}.xml {posargs}
+commands=py.test-3  --junitxml={envlogdir}/junit-{envname}.xml {posargs}
 deps=pytest>=2.3.5
 
 [testenv:docs]

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/tox.git



More information about the Python-modules-commits mailing list