1 new commit in pytest:
https://bitbucket.org/hpk42/pytest/changeset/bc206c7d9628/ changeset: bc206c7d9628 user: hpk42 date: 2011-11-18 18:59:52 summary: another try to properly fix durations sorting (still producing sometimes failing tests, apparently when two durations of a test report are identical) affected #: 1 file diff -r 56fdd8bb08ca14b168993d44c7dfa5147f06dfff -r bc206c7d96286b517a5f8d4ff089b323c9bc6c59 _pytest/runner.py --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -29,10 +29,10 @@ for replist in tr.stats.values(): for rep in replist: if hasattr(rep, 'duration'): - dlist.append((rep.duration, rep)) + dlist.append(rep) if not dlist: return - dlist.sort() + dlist.sort(key=lambda x: x.duration) dlist.reverse() if not durations: tr.write_sep("=", "slowest test durations") @@ -40,10 +40,10 @@ tr.write_sep("=", "slowest %s test durations" % durations) dlist = dlist[:durations] - for duration, rep in dlist: + for rep in dlist: nodeid = rep.nodeid.replace("::()::", "::") tr.write_line("%02.2fs %-8s %s" % - (duration, rep.when, nodeid)) + (rep.duration, rep.when, nodeid)) def pytest_sessionstart(session): session._setupstate = SetupState() 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