def test_dtox_empty_params(self): r = run(expect_error=True) assert r.returncode != 0 assert r.stdout == "using CODE_DIR=/code\n" assert r.stderr == "ERROR: toxini file 'tox.ini' not found\n" assert r.files_after == {}
def test_dtox_dot_dir_param(self): r = run(".", expect_error=True) assert r.returncode != 0 assert r.stdout == "" assert r.stderr == "Error: Working directory must be absolute: .\n" assert r.files_after == {}
def test_dtox_abs_dir_param(self, code_dir): r = run(code_dir, expect_error=True) assert r.returncode != 0 assert r.stdout == "using CODE_DIR={}\n".format(code_dir) assert r.stderr == "ERROR: toxini file 'tox.ini' not found\n" assert r.files_after == {}
def test_dtox_dot_dir_param(self): r = run(".", tox_ini=self.tox_ini, expect_error=True) assert r.returncode != 0 assert r.stdout == "" assert r.stderr == "Error: Working directory must be absolute: .\n" assert r.files_after == r.files_before assert r.files_updated == {} assert r.files_deleted == {} assert r.files_created == {}
def test_dtox_empty_params_py32_fails(self): tox_ini = """[tox] envlist = py32 skipsdist = True """ r = run(tox_ini=tox_ini, expect_error=True) assert r.returncode != 0 assert "InvocationError:" in r.stdout assert r.files_after == r.files_before assert r.files_updated == {} assert r.files_deleted == {} assert r.files_created == {}
def test_dtox_abs_dir_param(self, code_dir): r = run(code_dir, tox_ini=self.tox_ini) assert r.returncode == 0 assert "py26: commands succeeded" in r.stdout assert "py27: commands succeeded" in r.stdout assert "py33: commands succeeded" in r.stdout assert "py34: commands succeeded" in r.stdout assert "py35: commands succeeded" in r.stdout assert "pypy: commands succeeded" in r.stdout assert r.stderr == "" assert r.files_after == r.files_before assert r.files_updated == {} assert r.files_deleted == {} assert r.files_created == {}
def test_dtox_empty_params(self): # skip py32, there's something wrong with virtualenv+tox+py32 r = run(tox_ini=self.tox_ini) assert r.returncode == 0 assert "py26: commands succeeded" in r.stdout assert "py27: commands succeeded" in r.stdout assert "py33: commands succeeded" in r.stdout assert "py34: commands succeeded" in r.stdout assert "py35: commands succeeded" in r.stdout assert "pypy: commands succeeded" in r.stdout assert r.stderr == "" assert r.files_after == r.files_before assert r.files_updated == {} assert r.files_deleted == {} assert r.files_created == {}
def test_run_tox(self, pyenv, output): expected_output = "({})\n".format(output) tox_ini = """[tox] envlist = {} skipsdist = True [testenv] commands = python -c "import sys; print(sys.version_info[:2])" """.format(pyenv) r = run(tox_ini=tox_ini) assert r.returncode == 0 assert r.stderr == "" assert expected_output in r.stdout, r.stdout assert r.files_after == r.files_before