From 5e0d78f4f134ddc3830bff4f8871e0947892f756 Mon Sep 17 00:00:00 2001 From: Vasily Kuznetsov Date: Wed, 22 Jun 2016 14:53:37 +0200 Subject: [PATCH] Fix .format string failures on python 2.6 --- _pytest/python.py | 4 ++-- _pytest/runner.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_pytest/python.py b/_pytest/python.py index a644807ce..6c7be14de 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -2541,10 +2541,10 @@ class FixtureDef: if what == 'SETUP': deps = sorted(arg for arg in self.argnames if arg != 'request') if deps: - tw.write(' (fixtures used: {})'.format(', '.join(deps))) + tw.write(' (fixtures used: {0})'.format(', '.join(deps))) if hasattr(self, 'cached_param'): - tw.write('[{}]'.format(self.cached_param)) + tw.write('[{0}]'.format(self.cached_param)) if capman: capman.resumecapture() diff --git a/_pytest/runner.py b/_pytest/runner.py index 1d3ae78ab..d385027ad 100644 --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -91,10 +91,10 @@ def show_test_item(item): tw = item.config.get_terminal_writer() tw.line() tw.write(' ' * 8) - tw.write('{}'.format(item._nodeid)) + tw.write('{0}'.format(item._nodeid)) used_fixtures = sorted(item._fixtureinfo.name2fixturedefs.keys()) if used_fixtures: - tw.write(' (fixtures used: {})'.format(', '.join(used_fixtures))) + tw.write(' (fixtures used: {0})'.format(', '.join(used_fixtures))) def pytest_runtest_setup(item): item.session._setupstate.prepare(item)