Skip to content

Commit

Permalink
Apply code review suggestions for test compliance
Browse files Browse the repository at this point in the history
Co-authored-by: Venu Vardhan Reddy Tekula <[email protected]>
Signed-off-by: mjgaughan <[email protected]>
  • Loading branch information
mjgaughan and vchrombie authored Aug 14, 2024
1 parent 0704cd9 commit 220e227
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions tests/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -1819,13 +1819,9 @@ def test_tag_removal_sync(self):
new_commits = repo.sync()
self.assertEqual(len(new_commits), 0)

expected = [
'refs/heads/master',
'refs/tags/v.0.0-lw'
]
refs = [ref for ref in discover_refs(new_path).keys()]
refs.sort()
self.assertListEqual(refs, expected)
# Verify that the new tag 'v.0.0-lw' exists in the refs
refs = discover_refs(new_path)
self.assertIn('refs/tags/v.0.0-lw', refs)

# Delete the tag 'v.0.0-lw' and check that it has been deleted from refs
cmd = ['git', 'tag', '-d', 'v.0.0-lw']
Expand All @@ -1835,12 +1831,11 @@ def test_tag_removal_sync(self):
new_commits = repo.sync()
self.assertEqual(len(new_commits), 0)

expected = [
'refs/heads/master'
]
refs = [ref for ref in discover_refs(new_path).keys()]
refs.sort()
self.assertListEqual(refs, expected)
# Verify that the tag 'v.0.0-lw' is no longer in the refs
refs = discover_refs(new_path)
self.assertNotIn('refs/tags/v.0.0-lw', refs)
self.assertIn('refs/heads/master', refs)

# Cleanup
shutil.rmtree(editable_path)
shutil.rmtree(new_path)
Expand Down

0 comments on commit 220e227

Please sign in to comment.