mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-12 08:56:13 +01:00
Use f-strings where possible
This commit is contained in:
parent
f3119fa475
commit
661bc7757c
@ -73,7 +73,7 @@ class RequestWrongOrder(Exception):
|
|||||||
self.exp_method = exp_method
|
self.exp_method = exp_method
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return '%s, %s, %s, %s' % (self.url, self.exp_url, self.method, self.exp_method)
|
return f'{self.url}, {self.exp_url}, {self.method}, {self.exp_method}'
|
||||||
|
|
||||||
|
|
||||||
class RequestDataMismatch(Exception):
|
class RequestDataMismatch(Exception):
|
||||||
@ -85,7 +85,7 @@ class RequestDataMismatch(Exception):
|
|||||||
self.exp = exp
|
self.exp = exp
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return '%s, %s, %s' % (self.url, self.got, self.exp)
|
return f'{self.url}, {self.got}, {self.exp}'
|
||||||
|
|
||||||
|
|
||||||
EXPECTED_REQUESTS = []
|
EXPECTED_REQUESTS = []
|
||||||
|
@ -25,7 +25,7 @@ class TestRepairWC(OscTestCase):
|
|||||||
try:
|
try:
|
||||||
meth(*args, **kwargs)
|
meth(*args, **kwargs)
|
||||||
except exception:
|
except exception:
|
||||||
self.fail('%s raised' % exception.__name__)
|
self.fail(f'{exception.__name__} raised')
|
||||||
|
|
||||||
def test_working_empty(self):
|
def test_working_empty(self):
|
||||||
"""consistent, empty working copy"""
|
"""consistent, empty working copy"""
|
||||||
|
Loading…
Reference in New Issue
Block a user