Skip to content

Commit

Permalink
Add test_have_optional_dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
arjxn-py committed Nov 8, 2023
1 parent 926f8d7 commit ec963d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/unit/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ def test_git_commit_info(self):
self.assertIsInstance(git_commit_info, str)
self.assertEqual(git_commit_info[:2], "v2")

def test_have_optional_dependency(self):
with self.assertRaisesRegex(ImportError,"Optional dependency pybtex is not available. See https://docs.pybamm.org/en/latest/source/user_guide/installation/index.html#optional-dependencies for more details."):
pybamm.print_citations()


class TestSearch(TestCase):
def test_url_gets_to_stdout(self):
Expand Down

0 comments on commit ec963d1

Please sign in to comment.