Skip to content

Commit 708951c

Browse files
committed
fix test. clarify why undefined
1 parent e857a3f commit 708951c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/new_tests/test_log.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ def custom_log_callback(level, func, path, line, msg):
1313
callback_called = True
1414

1515
class TestLog(object):
16-
def setup_class(cls):
16+
@pytest.mark.fixture(autouse=True)
17+
def setup(self):
1718
global callback_called
1819
callback_called = False
1920

@@ -96,7 +97,6 @@ def test_set_log_handler_correct_with_none_argument(self):
9697

9798
# See comment in test_set_log_handler_with_no_args why we don't use capsys to check stdout
9899

99-
100100
def test_changing_log_level_does_not_affect_log_handler(self):
101101
global custom_log_callback
102102
aerospike.set_log_handler(custom_log_callback)
@@ -135,7 +135,7 @@ def test_set_log_handler_with_invalid_log_level(self, log_level):
135135
with pytest.raises(e.ParamError):
136136
aerospike.set_log_level(log_level)
137137

138-
# TODO: undefined behavior
138+
# TODO: undefined behavior (we're casting a value into an enum outside of its range)
139139
def test_set_log_level_incorrect(self):
140140
"""
141141
Test log level with a log level of valid type, but outside of

0 commit comments

Comments
 (0)