Fix '{0}' format for py26
This commit is contained in:
parent
43662ce789
commit
abbff681ba
|
@ -129,7 +129,7 @@ class TestRaises:
|
||||||
int('asdf')
|
int('asdf')
|
||||||
|
|
||||||
msg = "with base 16"
|
msg = "with base 16"
|
||||||
expr = r"Pattern '{}' not found in 'invalid literal for int\(\) with base 10: 'asdf''".format(msg)
|
expr = r"Pattern '{0}' not found in 'invalid literal for int\(\) with base 10: 'asdf''".format(msg)
|
||||||
with pytest.raises(AssertionError, match=expr):
|
with pytest.raises(AssertionError, match=expr):
|
||||||
with pytest.raises(ValueError, match=msg):
|
with pytest.raises(ValueError, match=msg):
|
||||||
int('asdf', base=10)
|
int('asdf', base=10)
|
||||||
|
|
Loading…
Reference in New Issue