()
| 1731 | |
| 1732 | |
| 1733 | def test_warn_len_equal_call_scenarios(): |
| 1734 | # assert_warn_len_equal is called under |
| 1735 | # varying circumstances depending on serial |
| 1736 | # vs. parallel test scenarios; this test |
| 1737 | # simply aims to probe both code paths and |
| 1738 | # check that no assertion is uncaught |
| 1739 | |
| 1740 | # parallel scenario -- no warning issued yet |
| 1741 | class mod: |
| 1742 | pass |
| 1743 | |
| 1744 | mod_inst = mod() |
| 1745 | |
| 1746 | assert_warn_len_equal(mod=mod_inst, |
| 1747 | n_in_context=0) |
| 1748 | |
| 1749 | # serial test scenario -- the __warningregistry__ |
| 1750 | # attribute should be present |
| 1751 | class mod: |
| 1752 | def __init__(self): |
| 1753 | self.__warningregistry__ = {'warning1': 1, |
| 1754 | 'warning2': 2} |
| 1755 | |
| 1756 | mod_inst = mod() |
| 1757 | assert_warn_len_equal(mod=mod_inst, |
| 1758 | n_in_context=2) |
| 1759 | |
| 1760 | |
| 1761 | def _get_fresh_mod(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…