Skip to content

Commit

Permalink
Skip versions tests if git does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Mar 16, 2022
1 parent d7f2fe5 commit 6dfdea6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ def test_versions(self):
)

for tag, expected in versions:
try:
version = find_dev_lsst_version(".", tag)
except git.GitError:
raise unittest.SkipTest("Git repository for this package not accessible.")
with self.subTest(tag=tag, expected=expected):
self.assertEqual(find_dev_lsst_version(".", tag), expected)
self.assertEqual(version, expected)


if __name__ == "__main__":
Expand Down

0 comments on commit 6dfdea6

Please sign in to comment.