()
| 1260 | |
| 1261 | |
| 1262 | def test_warn_len_equal_call_scenarios(): |
| 1263 | # assert_warn_len_equal is called under |
| 1264 | # varying circumstances depending on serial |
| 1265 | # vs. parallel test scenarios; this test |
| 1266 | # simply aims to probe both code paths and |
| 1267 | # check that no assertion is uncaught |
| 1268 | |
| 1269 | # parallel scenario -- no warning issued yet |
| 1270 | class mod: |
| 1271 | pass |
| 1272 | |
| 1273 | mod_inst = mod() |
| 1274 | |
| 1275 | assert_warn_len_equal(mod=mod_inst, |
| 1276 | n_in_context=0) |
| 1277 | |
| 1278 | # serial test scenario -- the __warningregistry__ |
| 1279 | # attribute should be present |
| 1280 | class mod: |
| 1281 | def __init__(self): |
| 1282 | self.__warningregistry__ = {'warning1':1, |
| 1283 | 'warning2':2} |
| 1284 | |
| 1285 | mod_inst = mod() |
| 1286 | assert_warn_len_equal(mod=mod_inst, |
| 1287 | n_in_context=2) |
| 1288 | |
| 1289 | |
| 1290 | def _get_fresh_mod(): |
nothing calls this directly
no test coverage detected