SHA256
1
0
forked from pool/python-tox
python-tox/tox-disable-network-accessing-tests.patch
Sascha Peilicke 4fc6232cca - Update to version 1.6.0:
+ fix issue119: {envsitepackagesdir} is now correctly computed and has
    a better test to prevent regression.
  + fix issue116: make 1.6 introduced behaviour of changing to a 
    per-env HOME directory during install activities dependent 
    on "--set-home" for now.  Should re-establish the old behaviour
    when no option is given.
  + fix issue118: correctly have two tests use realpath(). Thanks Barry
    Warsaw.
  + fix test runs on environments without a home directory
    (in this case we use toxinidir as the homedir)
  + fix issue117: python2.5 fix: don't use ``--insecure`` option because 
    its very existence depends on presence of "ssl".  If you
    want to support python2.5/pip1.3.1 based test environments you need 
    to install ssl and/or use PIP_INSECURE=1 through ``setenv``. section.
  + fix issue102: change to {toxinidir} when installing dependencies.
    this allows to use relative path like in "-rrequirements.txt".
- Changes from version 1.6.0:
  + fix issue35: add new EXPERIMENTAL "install_command" testenv-option to
    configure the installation command with options for dep/pkg install.
    Thanks Carl Meyer for the PR and docs.
  + fix issue91: python2.5 support by vendoring the virtualenv-1.9.1 
    script and forcing pip<1.4. Also the default [py25] environment 
    modifies the default installer_command (new config option)
    to use pip without the "--pre" option which was introduced 
    with pip-1.4 and is now required if you want to install non-stable 
    releases.  (tox defaults to install with "--pre" everywhere).
  + during installation of dependencies HOME is now set to a pseudo
    location ({envtmpdir}/pseudo-home).  If an index url was specified
    a .pydistutils.cfg file will be written with an index_url setting

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=13
2013-09-05 08:16:43 +00:00

227 lines
7.2 KiB
Diff

Binary files a/tests/.test_config.py.swp and b/tests/.test_config.py.swp differ
diff -ruN a/tests/test_z_cmdline.py b/tests/test_z_cmdline.py
--- a/tests/test_z_cmdline.py 2013-09-04 15:55:04.000000000 +0200
+++ b/tests/test_z_cmdline.py 2013-09-05 10:12:19.605599163 +0200
@@ -380,47 +380,47 @@
'''
})
- def test_toxuone_env(self, cmd, example123):
- result = cmd.run("tox")
- assert not result.ret
- result.stdout.fnmatch_lines([
- "*junit-python.xml*",
- "*1 passed*",
- ])
- result = cmd.run("tox", "-epython", )
- assert not result.ret
- result.stdout.fnmatch_lines([
- "*1 passed*",
- "*summary*",
- "*python: commands succeeded"
- ])
-
- def test_different_config_cwd(self, cmd, example123, monkeypatch):
- # see that things work with a different CWD
- monkeypatch.chdir(cmd.tmpdir)
- result = cmd.run("tox", "-c", "example123/tox.ini")
- assert not result.ret
- result.stdout.fnmatch_lines([
- "*1 passed*",
- "*summary*",
- "*python: commands succeeded"
- ])
-
- def test_json(self, cmd, example123):
- # see that tests can also fail and retcode is correct
- testfile = py.path.local("tests").join("test_hello.py")
- assert testfile.check()
- testfile.write("def test_fail(): assert 0")
- jsonpath = cmd.tmpdir.join("res.json")
- result = cmd.run("tox", "--result-json", jsonpath)
- assert result.ret == 1
- data = json.load(jsonpath.open("r"))
- verify_json_report_format(data)
- result.stdout.fnmatch_lines([
- "*1 failed*",
- "*summary*",
- "*python: *failed*",
- ])
+#def test_toxuone_env(self, cmd, example123):
+# result = cmd.run("tox")
+# assert not result.ret
+# result.stdout.fnmatch_lines([
+# "*junit-python.xml*",
+# "*1 passed*",
+# ])
+# result = cmd.run("tox", "-epython", )
+# assert not result.ret
+# result.stdout.fnmatch_lines([
+# "*1 passed*",
+# "*summary*",
+# "*python: commands succeeded"
+# ])
+
+#def test_different_config_cwd(self, cmd, example123, monkeypatch):
+# # see that things work with a different CWD
+# monkeypatch.chdir(cmd.tmpdir)
+# result = cmd.run("tox", "-c", "example123/tox.ini")
+# assert not result.ret
+# result.stdout.fnmatch_lines([
+# "*1 passed*",
+# "*summary*",
+# "*python: commands succeeded"
+# ])
+
+#def test_json(self, cmd, example123):
+# # see that tests can also fail and retcode is correct
+# testfile = py.path.local("tests").join("test_hello.py")
+# assert testfile.check()
+# testfile.write("def test_fail(): assert 0")
+# jsonpath = cmd.tmpdir.join("res.json")
+# result = cmd.run("tox", "--result-json", jsonpath)
+# assert result.ret == 1
+# data = json.load(jsonpath.open("r"))
+# verify_json_report_format(data)
+# result.stdout.fnmatch_lines([
+# "*1 failed*",
+# "*summary*",
+# "*python: *failed*",
+# ])
def test_develop(initproj, cmd):
@@ -430,14 +430,14 @@
assert not result.ret
assert "sdist-make" not in result.stdout.str()
-def test_usedevelop(initproj, cmd):
- initproj("example123", filedefs={'tox.ini': """
- [testenv]
- usedevelop=True
- """})
- result = cmd.run("tox", "-vv")
- assert not result.ret
- assert "sdist-make" not in result.stdout.str()
+# def test_usedevelop(initproj, cmd):
+# initproj("example123", filedefs={'tox.ini': """
+# [testenv]
+# usedevelop=True
+# """})
+# result = cmd.run("tox", "-vv")
+# assert not result.ret
+# assert "sdist-make" not in result.stdout.str()
def test_usedevelop_mixed(initproj, cmd):
initproj("example123", filedefs={'tox.ini': """
@@ -457,57 +457,57 @@
assert not result.ret
assert "sdist-make" in result.stdout.str()
-def test_test_usedevelop(cmd, initproj):
- initproj("example123-0.5", filedefs={
- 'tests': {'test_hello.py': """
- def test_hello(pytestconfig):
- pass
- """,
- },
- 'tox.ini': '''
- [testenv]
- usedevelop=True
- changedir=tests
- commands=
- py.test --basetemp={envtmpdir} --junitxml=junit-{envname}.xml []
- deps=pytest
- '''
- })
- result = cmd.run("tox", "-v")
- assert not result.ret
- result.stdout.fnmatch_lines([
- "*junit-python.xml*",
- "*1 passed*",
- ])
- assert "sdist-make" not in result.stdout.str()
- result = cmd.run("tox", "-epython", )
- assert not result.ret
- result.stdout.fnmatch_lines([
- "*1 passed*",
- "*summary*",
- "*python: commands succeeded"
- ])
- # see that things work with a different CWD
- old = cmd.tmpdir.chdir()
- result = cmd.run("tox", "-c", "example123/tox.ini")
- assert not result.ret
- result.stdout.fnmatch_lines([
- "*1 passed*",
- "*summary*",
- "*python: commands succeeded"
- ])
- old.chdir()
- # see that tests can also fail and retcode is correct
- testfile = py.path.local("tests").join("test_hello.py")
- assert testfile.check()
- testfile.write("def test_fail(): assert 0")
- result = cmd.run("tox", )
- assert result.ret
- result.stdout.fnmatch_lines([
- "*1 failed*",
- "*summary*",
- "*python: *failed*",
- ])
+#def test_test_usedevelop(cmd, initproj):
+# initproj("example123-0.5", filedefs={
+# 'tests': {'test_hello.py': """
+# def test_hello(pytestconfig):
+# pass
+# """,
+# },
+# 'tox.ini': '''
+# [testenv]
+# usedevelop=True
+# changedir=tests
+# commands=
+# py.test --basetemp={envtmpdir} --junitxml=junit-{envname}.xml []
+# deps=pytest
+# '''
+# })
+# result = cmd.run("tox", "-v")
+# assert not result.ret
+# result.stdout.fnmatch_lines([
+# "*junit-python.xml*",
+# "*1 passed*",
+# ])
+# assert "sdist-make" not in result.stdout.str()
+# result = cmd.run("tox", "-epython", )
+# assert not result.ret
+# result.stdout.fnmatch_lines([
+# "*1 passed*",
+# "*summary*",
+# "*python: commands succeeded"
+# ])
+# # see that things work with a different CWD
+# old = cmd.tmpdir.chdir()
+# result = cmd.run("tox", "-c", "example123/tox.ini")
+# assert not result.ret
+# result.stdout.fnmatch_lines([
+# "*1 passed*",
+# "*summary*",
+# "*python: commands succeeded"
+# ])
+# old.chdir()
+# # see that tests can also fail and retcode is correct
+# testfile = py.path.local("tests").join("test_hello.py")
+# assert testfile.check()
+# testfile.write("def test_fail(): assert 0")
+# result = cmd.run("tox", )
+# assert result.ret
+# result.stdout.fnmatch_lines([
+# "*1 failed*",
+# "*summary*",
+# "*python: *failed*",
+# ])
def test_test_piphelp(initproj, cmd):
Binary files a/tests/.test_z_cmdline.py.swp and b/tests/.test_z_cmdline.py.swp differ