Total Complexity | 2 |
Total Lines | 14 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from unittest import mock |
||
2 | import pytest |
||
3 | import sys |
||
4 | |||
5 | |||
6 | @pytest.mark.filterwarnings( |
||
7 | "ignore:.*imp module is deprecated.*" |
||
8 | ) # ansiwrap spits out an unrelated warning |
||
9 | def test_initialize_autocomplete_runs_without_readline(): |
||
10 | from jrnl import install |
||
11 | |||
12 | with mock.patch.dict(sys.modules, {"readline": None}): |
||
13 | install._initialize_autocomplete() # should not throw exception |
||
14 |