Skip to content

Commit

Permalink
Add missing assert keywords
Browse files Browse the repository at this point in the history
This turns two tuple expression statements--each of an equality
comparison and message--that were not being checked or otherwise
used, and that were intended to be assertions, into assertions.
  • Loading branch information
EliahKagan committed Sep 25, 2023
1 parent b27a89f commit 4e701bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_submodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,8 +1031,8 @@ def test_branch_renames(self, rw_dir):
# This doesn't fail as our own submodule binsha didn't change, and the reset is only triggered if
# to latest revision is True.
parent_repo.submodule_update(to_latest_revision=False)
sm_mod.head.ref.name == sm_pfb.name, "should have been switched to past head"
sm_mod.commit() == sm_fb.commit, "Head wasn't reset"
assert sm_mod.head.ref.name == sm_pfb.name, "should have been switched to past head"
assert sm_mod.commit() == sm_fb.commit, "Head wasn't reset"

self.assertRaises(RepositoryDirtyError, parent_repo.submodule_update, to_latest_revision=True)
parent_repo.submodule_update(to_latest_revision=True, force_reset=True)
Expand Down

0 comments on commit 4e701bd

Please sign in to comment.