1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-06 13:18: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

@@ -12,7 +12,7 @@ FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'repairwc_fixtures')
def suite():
import unittest
return unittest.makeSuite(TestRepairWC)
return unittest.defaultTestLoader.loadTestsFromTestCase(TestRepairWC)
class TestRepairWC(OscTestCase):
def _get_fixtures_dir(self):
@@ -223,7 +223,7 @@ class TestRepairWC(OscTestCase):
prj.wc_repair('http://localhost')
self.assertTrue(os.path.exists(os.path.join(storedir, '_apiurl')))
self.assertTrue(os.path.exists(os.path.join(storedir, '_apiurl')))
self.assertEqual(open(os.path.join(storedir, '_apiurl'), 'r').read(), 'http://localhost\n')
self.assertEqual(open(os.path.join(storedir, '_apiurl')).read(), 'http://localhost\n')
if __name__ == '__main__':