Skip to content
Snippets Groups Projects
Commit 3828e51c authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

DEBUG:

parent ffd237fe
No related branches found
No related tags found
2 merge requests!108Release 0.5.0,!104Create a new scanner module and move functions from crawl module there
Pipeline #34994 passed
......@@ -42,7 +42,8 @@ import pytest
def test_constructor():
with warnings.catch_warnings(record=True) as w:
# Cause all warnings to always be triggered.
warnings.simplefilter("always")
warnings.filterwarnings("ignore")
warnings.filterwarnings("always", category=DeprecationWarning)
Crawler(debug=True)
assert issubclass(w[-1].category, DeprecationWarning)
......@@ -57,9 +58,12 @@ def test_constructor():
def test_deprecated_functions():
with warnings.catch_warnings(record=True) as w:
# Cause all warnings to always be triggered.
warnings.simplefilter("always")
warnings.filterwarnings("ignore")
warnings.filterwarnings("always", category=DeprecationWarning)
cr = Crawler()
cr.crawl_directory(".", rfp("scifolder_cfood.yml"))
print(w)
print(w[0].message)
assert issubclass(w[-1].category, DeprecationWarning)
assert "The function crawl_directory in the crawl" in str(w[-1].message)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment