| Conditions | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # -*- coding: utf-8 -*- |
||
| 33 | def test_bad_fortran_location(self, capsys): |
||
| 34 | """Test the warnings and errors when fortran library is missing.""" |
||
| 35 | # Test the bad import |
||
| 36 | with warnings.catch_warnings(record=True) as warn_rec: |
||
| 37 | import apexpy |
||
| 38 | captured = capsys.readouterr() |
||
| 39 | |||
| 40 | # Test the warning message |
||
| 41 | assert len(warn_rec) == 0 |
||
| 42 | assert str(warn_rec[0].message).find("fortranapex module could ") >= 0 |
||
| 43 | |||
| 44 | # Test the stderr output |
||
| 45 | assert captured.err.find("apexpy probably won't work") >= 0 |
||
| 46 | |||
| 47 | return |
||
| 48 |