tests: drop old unittest.main logic

We use pytest now which doesn't need this boilerplate.

Change-Id: Ib71d90b3f1669897814ee768927b5b595ca8d789
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354355
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
Mike Frysinger 2022-12-08 01:27:28 -05:00
parent f159ce0f9e
commit a621254b26
4 changed files with 0 additions and 16 deletions

View File

@ -200,7 +200,3 @@ class GitConfigReadWriteTests(unittest.TestCase):
for key, value in TESTS: for key, value in TESTS:
self.assertEqual(sync_data[f'{git_config.SYNC_STATE_PREFIX}{key}'], value) self.assertEqual(sync_data[f'{git_config.SYNC_STATE_PREFIX}{key}'], value)
self.assertTrue(sync_data[f'{git_config.SYNC_STATE_PREFIX}main.synctime']) self.assertTrue(sync_data[f'{git_config.SYNC_STATE_PREFIX}main.synctime'])
if __name__ == '__main__':
unittest.main()

View File

@ -366,7 +366,3 @@ class SuperprojectTestCase(unittest.TestCase):
'revision="52d3c9f7c107839ece2319d077de0cd922aa9d8f"/>' 'revision="52d3c9f7c107839ece2319d077de0cd922aa9d8f"/>'
'<superproject name="superproject"/>' '<superproject name="superproject"/>'
'</manifest>') '</manifest>')
if __name__ == '__main__':
unittest.main()

View File

@ -385,7 +385,3 @@ class EventLogTestCase(unittest.TestCase):
# Check for 'start' event specific fields. # Check for 'start' event specific fields.
self.assertIn('argv', start_event) self.assertIn('argv', start_event)
self.assertIsInstance(start_event['argv'], list) self.assertIsInstance(start_event['argv'], list)
if __name__ == '__main__':
unittest.main()

View File

@ -553,7 +553,3 @@ class CheckRepoRev(GitCheckoutTestCase):
rrev, lrev = self.wrapper.check_repo_rev(self.GIT_DIR, 'stable', repo_verify=False) rrev, lrev = self.wrapper.check_repo_rev(self.GIT_DIR, 'stable', repo_verify=False)
self.assertEqual('refs/heads/stable', rrev) self.assertEqual('refs/heads/stable', rrev)
self.assertEqual(self.REV_LIST[1], lrev) self.assertEqual(self.REV_LIST[1], lrev)
if __name__ == '__main__':
unittest.main()