Skip to content

Commit

Permalink
Use documented verion_info in test_index_file_diffing
Browse files Browse the repository at this point in the history
Instead of directly accessing the _version_info attribute.

This fixes a new test failure since the way the public version_info
property uses the _version_info backing attribute has changed, and
also shows the usage that is documented (accessing _version_info
was never guaranteed to work, and now longer works as before).
  • Loading branch information
EliahKagan committed Feb 22, 2024
1 parent f699a38 commit 74c04a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def test_index_file_diffing(self, rw_repo):
index.checkout(test_file)
except CheckoutError as e:
# Detailed exceptions are only possible in older git versions.
if rw_repo.git._version_info < (2, 29):
if rw_repo.git.version_info < (2, 29):
self.assertEqual(len(e.failed_files), 1)
self.assertEqual(e.failed_files[0], osp.basename(test_file))
self.assertEqual(len(e.failed_files), len(e.failed_reasons))
Expand Down

0 comments on commit 74c04a8

Please sign in to comment.