1 new commit in pytest:
https://bitbucket.org/hpk42/pytest/changeset/b8e508e8e8ba/ changeset: b8e508e8e8ba user: hpk42 date: 2011-11-08 21:57:19 summary: simplify durations output, no percentage, no "remaining" bits affected #: 4 files diff -r ca6adfab10e932cf4c5fdcfbe161542f2b6e7339 -r b8e508e8e8bacbe70d0061ca402009c4820afb1c _pytest/__init__.py --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.2.0.dev4' +__version__ = '2.2.0.dev5' diff -r ca6adfab10e932cf4c5fdcfbe161542f2b6e7339 -r b8e508e8e8bacbe70d0061ca402009c4820afb1c _pytest/runner.py --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -26,35 +26,31 @@ return tr = terminalreporter duration2rep = {} - alldurations = 0.0 for key, replist in tr.stats.items(): for rep in replist: if hasattr(rep, 'duration'): duration2rep[rep.duration] = rep - alldurations += rep.duration if not duration2rep: return d2 = list(duration2rep.items()) d2.sort() d2.reverse() - remaining = [] + #remaining = [] if not durations: tr.write_sep("=", "slowest test durations") else: tr.write_sep("=", "slowest %s test durations" % durations) - remaining = d2[durations:] + #remaining = d2[durations:] d2 = d2[:durations] - assert (alldurations/100) > 0 for duration, rep in d2: nodeid = rep.nodeid.replace("::()::", "::") - percent = rep.duration / (alldurations / 100) - tr.write_line("%02.2fs %-02.2f%% %s %s" % - (duration, percent, rep.when, nodeid)) - if remaining: - remsum = sum(map(lambda x: x[0], remaining)) - tr.write_line("%02.2fs %-02.2f%% remaining in %d test phases" %( - remsum, remsum / (alldurations / 100), len(remaining))) + tr.write_line("%02.2fs %s %s" % + (duration, rep.when, nodeid)) + #if remaining: + # remsum = sum(map(lambda x: x[0], remaining)) + # tr.write_line("%02.2fs spent in %d remaining test phases" %( + # remsum, len(remaining))) def pytest_sessionstart(session): diff -r ca6adfab10e932cf4c5fdcfbe161542f2b6e7339 -r b8e508e8e8bacbe70d0061ca402009c4820afb1c setup.py --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ name='pytest', description='py.test: simple powerful testing with Python', long_description = long_description, - version='2.2.0.dev4', + version='2.2.0.dev5', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], diff -r ca6adfab10e932cf4c5fdcfbe161542f2b6e7339 -r b8e508e8e8bacbe70d0061ca402009c4820afb1c testing/acceptance_test.py --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -487,7 +487,6 @@ "*call*test_2*", "*call*test_1*", ]) - assert "remaining in" not in result.stdout.str() def test_calls_show_2(self, testdir): testdir.makepyfile(self.source) @@ -497,7 +496,6 @@ "*durations*", "*call*test_3*", "*call*test_2*", - "*s*%*remaining in 7 test phases", ]) assert "test_1" not in result.stdout.str() 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. _______________________________________________ py-svn mailing list py-svn@codespeak.net http://codespeak.net/mailman/listinfo/py-svn