1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-06 21:28:42 +02:00

Modernize code with pyupgrade

pyupgrade --keep-percent-format --py36-plus `find -name '*.py'`
This commit is contained in:
2022-07-28 19:11:29 +02:00
parent e7af9cebb3
commit feb53212dd
38 changed files with 126 additions and 138 deletions

View File

@@ -8,7 +8,7 @@ from .common import GET, OscTestCase
def suite():
import unittest
return unittest.makeSuite(TestResults)
return unittest.defaultTestLoader.loadTestsFromTestCase(TestResults)
class TestResults(OscTestCase):
def setUp(self):
@@ -29,7 +29,7 @@ class TestResults(OscTestCase):
return sys.stdout.getvalue()
def _get_fixture(self, filename):
return open(os.path.join(self._get_fixtures_dir(), filename), 'r').read()
return open(os.path.join(self._get_fixtures_dir(), filename)).read()
@GET('http://localhost/build/testproject/_result', file='result.xml')
def testPrjresults(self):