(filename, check_deprecation_warning="auto")
| 18 | |
| 19 | |
| 20 | def load_obj(filename, check_deprecation_warning="auto"): |
| 21 | if check_deprecation_warning == "auto": |
| 22 | check_deprecation_warning = False |
| 23 | pickle_filepath = PICKLE_DIRECTORY / filename |
| 24 | if not pickle_filepath.exists(): |
| 25 | pytest.skip(f"Could not find {str(pickle_filepath)}") |
| 26 | with open(str(pickle_filepath), "rb") as f: |
| 27 | if check_deprecation_warning: |
| 28 | msg = "A pickle file created using an old" |
| 29 | with pytest.warns(UserWarning, match=msg): |
| 30 | obj = pickle.load(f) |
| 31 | else: |
| 32 | obj = pickle.load(f) |
| 33 | return obj |
| 34 | |
| 35 | |
| 36 | def test_simple_func(): |
no outgoing calls
no test coverage detected
searching dependent graphs…