Skip to content

Commit 6869371

Browse files
committed
Deprecate test_fetch.py::test_limit_warning
Deprecated in #1084
1 parent a5eb6fb commit 6869371

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

tests/test_fetch.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -202,28 +202,6 @@ def test_offset(lang, languages):
202202
assert np.all([cc == ll for cc, ll in zip(c, l)]), "Sorting order is different"
203203

204204

205-
def test_limit_warning(lang):
206-
"""Tests whether warning is raised if offset is used without limit."""
207-
logger = logging.getLogger("datajoint")
208-
log_capture = io.StringIO()
209-
stream_handler = logging.StreamHandler(log_capture)
210-
log_format = logging.Formatter(
211-
"[%(asctime)s][%(funcName)s][%(levelname)s]: %(message)s"
212-
)
213-
stream_handler.setFormatter(log_format)
214-
stream_handler.set_name("test_limit_warning")
215-
logger.addHandler(stream_handler)
216-
lang.fetch(offset=1)
217-
218-
log_contents = log_capture.getvalue()
219-
log_capture.close()
220-
221-
for handler in logger.handlers: # Clean up handler
222-
if handler.name == "test_limit_warning":
223-
logger.removeHandler(handler)
224-
assert "[WARNING]: Offset set, but no limit." in log_contents
225-
226-
227205
def test_len(lang):
228206
"""Tests __len__"""
229207
assert len(lang.fetch()) == len(lang), "__len__ is not behaving properly"

0 commit comments

Comments
 (0)