2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/52b615fe1946/ Changeset: 52b615fe1946 User: hpk42 Date: 2013-07-06 15:38:40 Summary: move to development doc target Affected #: 2 files
diff -r 9d60521c1e64ed81ba7bd40a241e7a631282cc7e -r 52b615fe194684a209c2d68f4dc9d998bdb9a9e5 doc/en/Makefile --- a/doc/en/Makefile +++ b/doc/en/Makefile @@ -12,7 +12,7 @@ PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -SITETARGET=latest +SITETARGET=dev .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest diff -r 9d60521c1e64ed81ba7bd40a241e7a631282cc7e -r 52b615fe194684a209c2d68f4dc9d998bdb9a9e5 doc/en/conf.py --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -17,7 +17,7 @@ # # The full version, including alpha/beta/rc tags. # The short X.Y version. -version = release = "2.3.5" +version = release = "2.4.0.dev" import sys, os https://bitbucket.org/hpk42/pytest/commits/16e79a864e96/ Changeset: 16e79a864e96 User: hpk42 Date: 2013-07-06 16:03:48 Summary: merge Affected #: 6 files diff -r 52b615fe194684a209c2d68f4dc9d998bdb9a9e5 -r 16e79a864e9661f52ef93a2a4afbeae3299664e7 .gitignore --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ +# Automatically generated by `hgimportsvn` +.svn +.hgsvn + +# Ignore local virtualenvs +lib/ +bin/ +include/ +.Python/ + +# These lines are suggested according to the svn:ignore property +# Feel free to enable them by uncommenting them +*.pyc +*.pyo +*.swp +*.html +*.class +*.orig +*~ + +doc/*/_build +build/ +dist/ +*.egg-info +issue/ +env/ +3rdparty/ +.tox +.cache +.coverage +.ropeproject + diff -r 52b615fe194684a209c2d68f4dc9d998bdb9a9e5 -r 16e79a864e9661f52ef93a2a4afbeae3299664e7 .travis.yml --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: python +# command to install dependencies +install: "pip install -e . detox" +# # command to run tests +script: detox --recreate +notifications: + irc: + - "chat.freenode.net#pylib" + email: + - pytest-commit@python.org diff -r 52b615fe194684a209c2d68f4dc9d998bdb9a9e5 -r 16e79a864e9661f52ef93a2a4afbeae3299664e7 README.rst --- a/README.rst +++ b/README.rst @@ -16,6 +16,9 @@ - many `external plugins <http://pytest.org/latest/plugins.html#installing-external-plugins-searching>`_. +.. image:: https://secure.travis-ci.org/bubenkoff/pytest.png?branch=travis-integration + :target: http://travis-ci.org/bubenkoff/pytest + A simple example for a test:: # content of test_module.py diff -r 52b615fe194684a209c2d68f4dc9d998bdb9a9e5 -r 16e79a864e9661f52ef93a2a4afbeae3299664e7 _pytest/terminal.py --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -44,7 +44,7 @@ pass else: config._cleanup.append(lambda: newstdout.close()) - assert stdout.encoding == newstdout.encoding + assert stdout.encoding == newstdout.encoding stdout = newstdout reporter = TerminalReporter(config, stdout) @@ -105,7 +105,7 @@ self.hasmarkup = self._tw.hasmarkup def hasopt(self, char): - char = {'xfailed': 'x', 'skipped': 's'}.get(char,char) + char = {'xfailed': 'x', 'skipped': 's'}.get(char, char) return char in self.reportchars def write_fspath_result(self, fspath, res): @@ -154,7 +154,7 @@ def pytest_plugin_registered(self, plugin): if self.config.option.traceconfig: - msg = "PLUGIN registered: %s" %(plugin,) + msg = "PLUGIN registered: %s" % (plugin,) # XXX this event may happen during setup/teardown time # which unfortunately captures our output here # which garbles our output if we use self.write_line @@ -209,7 +209,7 @@ self.currentfspath = -2 def pytest_collection(self): - if not self.hasmarkup and self.config.option.verbose >=1: + if not self.hasmarkup and self.config.option.verbose >= 1: self.write("collecting ... ", bold=True) def pytest_collectreport(self, report): @@ -325,8 +325,8 @@ stack.append(col) #if col.name == "()": # continue - indent = (len(stack)-1) * " " - self._tw.line("%s%s" %(indent, col)) + indent = (len(stack) - 1) * " " + self._tw.line("%s%s" % (indent, col)) def pytest_sessionfinish(self, exitstatus, __multicall__): __multicall__.execute() @@ -452,9 +452,9 @@ if key: # setup/teardown reports have an empty key, ignore them val = self.stats.get(key, None) if val: - parts.append("%d %s" %(len(val), key)) + parts.append("%d %s" % (len(val), key)) line = ", ".join(parts) - msg = "%s in %.2f seconds" %(line, session_duration) + msg = "%s in %.2f seconds" % (line, session_duration) if self.verbosity >= 0: markup = dict(bold=True) if 'failed' in self.stats: @@ -462,6 +462,10 @@ else: markup['green'] = True self.write_sep("=", msg, **markup) + if self.verbosity == -1: + if line: + self.write("%s, " % line) + self.write("time: %.2f seconds\n" % session_duration) #else: # self.write_line(msg, bold=True) @@ -475,7 +479,7 @@ if m: l.append("-m %r" % m) if l: - self.write_sep("=", "%d tests deselected by %r" %( + self.write_sep("=", "%d tests deselected by %r" % ( len(self.stats['deselected']), " ".join(l)), bold=True) def repr_pythonversion(v=None): diff -r 52b615fe194684a209c2d68f4dc9d998bdb9a9e5 -r 16e79a864e9661f52ef93a2a4afbeae3299664e7 testing/test_terminal.py --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -1,7 +1,7 @@ """ terminal reporting of the full testing process. """ -import pytest,py +import pytest, py import sys from _pytest.terminal import TerminalReporter, repr_pythonversion, getreportopt @@ -32,7 +32,7 @@ metafunc.addcall(id="verbose", funcargs={'option': Option(verbose=True)}) metafunc.addcall(id="quiet", - funcargs={'option': Option(verbose=-1)}) + funcargs={'option': Option(verbose= -1)}) metafunc.addcall(id="fulltrace", funcargs={'option': Option(fulltrace=True)}) @@ -286,7 +286,7 @@ try: monkeypatch.setattr(sys, 'version_info', (2, 5, 1, 'final', 0)) assert repr_pythonversion() == "2.5.1-final-0" - py.std.sys.version_info = x = (2,3) + py.std.sys.version_info = x = (2, 3) assert repr_pythonversion() == str(x) finally: monkeypatch.undo() # do this early as pytest can get confused @@ -411,7 +411,7 @@ verinfo = ".".join(map(str, py.std.sys.version_info[:3])) result.stdout.fnmatch_lines([ "*===== test session starts ====*", - "platform %s -- Python %s*" %( + "platform %s -- Python %s*" % ( py.std.sys.platform, verinfo), # , py.std.sys.executable), "*test_header_trailer_info.py .", "=* 1 passed in *.[0-9][0-9] seconds *=", @@ -473,6 +473,17 @@ assert 'test session starts' not in s assert p1.basename not in s assert "===" not in s + assert "passed" in s + + def test_more_quiet_reporting(self, testdir): + p1 = testdir.makepyfile("def test_pass(): pass") + result = testdir.runpytest(p1, '-qq') + s = result.stdout.str() + assert 'test session starts' not in s + assert p1.basename not in s + assert "===" not in s + assert "passed" not in s + def test_fail_extra_reporting(testdir): p = testdir.makepyfile("def test_this(): assert 0") @@ -679,5 +690,5 @@ """) result = testdir.runpytest("--tb=native") result.stdout.fnmatch_lines([ - '*File *test_tbstyle_native_setup_error.py", line *, in setup_error_fixture*' + '*File *test_tbstyle_native_setup_error.py", line *, in setup_error_fixture*' ]) diff -r 52b615fe194684a209c2d68f4dc9d998bdb9a9e5 -r 16e79a864e9661f52ef93a2a4afbeae3299664e7 tox.ini --- a/tox.ini +++ b/tox.ini @@ -13,6 +13,10 @@ changedir=. commands= py.test --genscript=pytest1 +[testenv:py25] +setenv = + PIP_INSECURE=1 + [testenv:py27-xdist] changedir=. basepython=python2.7 @@ -29,6 +33,7 @@ deps=pytest-xdist setenv= PYTHONDONTWRITEBYTECODE=1 +distribute=true commands= py.test -n3 -rfsxX \ --junitxml={envlogdir}/junit-{envname}.xml {posargs:testing} Repository URL: https://bitbucket.org/hpk42/pytest/ -- 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 pytest-commit@python.org http://mail.python.org/mailman/listinfo/pytest-commit