Skip to content

Commit 47c9932

Browse files
committed
Add test function to improve coverage
1 parent aabd41a commit 47c9932

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/test_config.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,22 @@ def test_change_excl_zone_denom():
1111
assert core.get_max_window_size(10) == 7
1212

1313

14-
def test_reset():
14+
def test_reset_one_var():
1515
ref = config.STUMPY_EXCL_ZONE_DENOM
1616

1717
config.STUMPY_EXCL_ZONE_DENOM += 1
1818
config._reset("STUMPY_EXCL_ZONE_DENOM")
1919

2020
assert config.STUMPY_EXCL_ZONE_DENOM == ref
21+
22+
23+
def test_reset_all_vars():
24+
ref_fastmath = config.STUMPY_FASTMATH_TRUE
25+
ref_excl_zone_denom = config.STUMPY_EXCL_ZONE_DENOM
26+
27+
config.STUMPY_FASTMATH_TRUE = not config.STUMPY_FASTMATH_TRUE
28+
config.STUMPY_EXCL_ZONE_DENOM += 1
29+
30+
config._reset()
31+
assert config.STUMPY_FASTMATH_TRUE == ref_fastmath
32+
assert config.STUMPY_EXCL_ZONE_DENOM == ref_excl_zone_denom

0 commit comments

Comments
 (0)