1 new commit in tox:
https://bitbucket.org/hpk42/tox/commits/275cb4d13406/
Changeset: 275cb4d13406
User: hpk42
Date: 2014-05-01 09:12:19
Summary: Merged in msabramo/tox/test_quickstart_multiline_with_comments
(pull request #102)
test_quickstart: Use multilines and add comments for better understanding
Affected #: 1 file
diff -r 9c19ff552a68d173d0fa3146d4e1329d8b6b2012 -r
275cb4d13406a6ce5e59b8dee8b03f98a53d32f1 tests/test_quickstart.py
--- a/tests/test_quickstart.py
+++ b/tests/test_quickstart.py
@@ -6,6 +6,7 @@
def cleandir(tmpdir):
tmpdir.chdir()
+
class TestToxQuickstartMain(object):
def mock_term_input_return_values(self, return_values):
@@ -23,12 +24,26 @@
return mock_term_input
- def test_quickstart_main_choose_individual_pythons_and_pytest(self,
- monkeypatch):
+ def test_quickstart_main_choose_individual_pythons_and_pytest(
+ self,
+ monkeypatch):
monkeypatch.setattr(
tox._quickstart, 'term_input',
self.get_mock_term_input(
- ['4', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'py.test', 'pytest']))
+ [
+ '4', # Python versions: choose one by one
+ 'Y', # py26
+ 'Y', # py27
+ 'Y', # py32
+ 'Y', # py33
+ 'Y', # py34
+ 'Y', # pypy
+ 'N', # jython
+ 'py.test', # command to run tests
+ 'pytest' # test dependencies
+ ]
+ )
+ )
tox._quickstart.main(argv=['tox-quickstart'])
@@ -49,11 +64,26 @@
result = open('tox.ini').read()
assert(result == expected_tox_ini)
- def
test_quickstart_main_choose_individual_pythons_and_nose_adds_deps(self,
monkeypatch):
+ def test_quickstart_main_choose_individual_pythons_and_nose_adds_deps(
+ self,
+ monkeypatch):
monkeypatch.setattr(
tox._quickstart, 'term_input',
- self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N',
- 'nosetests', '']))
+ self.get_mock_term_input(
+ [
+ '4', # Python versions: choose one by one
+ 'Y', # py26
+ 'Y', # py27
+ 'Y', # py32
+ 'Y', # py33
+ 'Y', # py34
+ 'Y', # pypy
+ 'N', # jython
+ 'nosetests', # command to run tests
+ '' # test dependencies
+ ]
+ )
+ )
tox._quickstart.main(argv=['tox-quickstart'])
@@ -74,11 +104,26 @@
result = open('tox.ini').read()
assert(result == expected_tox_ini)
- def
test_quickstart_main_choose_individual_pythons_and_trial_adds_deps(self,
monkeypatch):
+ def test_quickstart_main_choose_individual_pythons_and_trial_adds_deps(
+ self,
+ monkeypatch):
monkeypatch.setattr(
tox._quickstart, 'term_input',
- self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N',
- 'trial', '']))
+ self.get_mock_term_input(
+ [
+ '4', # Python versions: choose one by one
+ 'Y', # py26
+ 'Y', # py27
+ 'Y', # py32
+ 'Y', # py33
+ 'Y', # py34
+ 'Y', # pypy
+ 'N', # jython
+ 'trial', # command to run tests
+ '' # test dependencies
+ ]
+ )
+ )
tox._quickstart.main(argv=['tox-quickstart'])
@@ -99,11 +144,26 @@
result = open('tox.ini').read()
assert(result == expected_tox_ini)
- def
test_quickstart_main_choose_individual_pythons_and_pytest_adds_deps(self,
monkeypatch):
+ def test_quickstart_main_choose_individual_pythons_and_pytest_adds_deps(
+ self,
+ monkeypatch):
monkeypatch.setattr(
tox._quickstart, 'term_input',
- self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N',
- 'py.test', '']))
+ self.get_mock_term_input(
+ [
+ '4', # Python versions: choose one by one
+ 'Y', # py26
+ 'Y', # py27
+ 'Y', # py32
+ 'Y', # py33
+ 'Y', # py34
+ 'Y', # pypy
+ 'N', # jython
+ 'py.test', # command to run tests
+ '' # test dependencies
+ ]
+ )
+ )
tox._quickstart.main(argv=['tox-quickstart'])
expected_tox_ini = """
@@ -123,10 +183,19 @@
result = open('tox.ini').read()
assert(result == expected_tox_ini)
- def test_quickstart_main_choose_py27_and_pytest_adds_deps(self,
monkeypatch):
+ def test_quickstart_main_choose_py27_and_pytest_adds_deps(
+ self,
+ monkeypatch):
monkeypatch.setattr(
tox._quickstart, 'term_input',
- self.get_mock_term_input(['1', 'py.test', '']))
+ self.get_mock_term_input(
+ [
+ '1', # py27
+ 'py.test', # command to run tests
+ '' # test dependencies
+ ]
+ )
+ )
tox._quickstart.main(argv=['tox-quickstart'])
@@ -147,10 +216,19 @@
result = open('tox.ini').read()
assert(result == expected_tox_ini)
- def test_quickstart_main_choose_py27_and_py33_and_pytest_adds_deps(self,
monkeypatch):
+ def test_quickstart_main_choose_py27_and_py33_and_pytest_adds_deps(
+ self,
+ monkeypatch):
monkeypatch.setattr(
tox._quickstart, 'term_input',
- self.get_mock_term_input(['2', 'py.test', '']))
+ self.get_mock_term_input(
+ [
+ '2', # py27 and py33
+ 'py.test', # command to run tests
+ '' # test dependencies
+ ]
+ )
+ )
tox._quickstart.main(argv=['tox-quickstart'])
@@ -171,10 +249,19 @@
result = open('tox.ini').read()
assert(result == expected_tox_ini)
- def test_quickstart_main_choose_all_pythons_and_pytest_adds_deps(self,
monkeypatch):
+ def test_quickstart_main_choose_all_pythons_and_pytest_adds_deps(
+ self,
+ monkeypatch):
monkeypatch.setattr(
tox._quickstart, 'term_input',
- self.get_mock_term_input(['3', 'py.test', '']))
+ self.get_mock_term_input(
+ [
+ '3', # all Python versions
+ 'py.test', # command to run tests
+ '' # test dependencies
+ ]
+ )
+ )
tox._quickstart.main(argv=['tox-quickstart'])
@@ -195,10 +282,26 @@
result = open('tox.ini').read()
assert(result == expected_tox_ini)
- def test_quickstart_main_choose_individual_pythons_and_defaults(self,
monkeypatch):
+ def test_quickstart_main_choose_individual_pythons_and_defaults(
+ self,
+ monkeypatch):
monkeypatch.setattr(
tox._quickstart, 'term_input',
- self.get_mock_term_input(['4', '', '', '', '', '', '', '', '', '',
'', '']))
+ self.get_mock_term_input(
+ [
+ '4', # Python versions: choose one by one
+ '', # py26
+ '', # py27
+ '', # py32
+ '', # py33
+ '', # py34
+ '', # pypy
+ '', # jython
+ '', # command to run tests
+ '' # test dependencies
+ ]
+ )
+ )
tox._quickstart.main(argv=['tox-quickstart'])
@@ -228,7 +331,22 @@
monkeypatch.setattr(
tox._quickstart, 'term_input',
- self.get_mock_term_input(['4', '', '', '', '', '', '', '', '', '',
'', '']))
+ self.get_mock_term_input(
+ [
+ '4', # Python versions: choose one by one
+ '', # py26
+ '', # py27
+ '', # py32
+ '', # py33
+ '', # py34
+ '', # pypy
+ '', # jython
+ '', # command to run tests
+ '', # test dependencies
+ '', # tox.ini already exists; overwrite?
+ ]
+ )
+ )
tox._quickstart.main(argv=['tox-quickstart'])
Repository URL: https://bitbucket.org/hpk42/tox/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
pytest-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-commit