Commit 26722b03 authored by Dmitry Volodin's avatar Dmitry Volodin
Browse files

Merge branch 'noc-requirements-remove-esmre' into 'master'

noc/noc#1902 Remove ESMRE library from requirements

See merge request noc/noc!6611
parents eda26501 f2358e03
......@@ -70,8 +70,6 @@ yappi==1.3.3
ssh2-python==0.26.0; extra == "activator"
# Classifier
bitarray==2.3.4; extra == "classifier"
# esmre==0.5.2; extra == "classifier"
https://github.com/wharris/esmre/archive/refs/heads/main.zip
# Cache-Redis
hiredis==1.1.0; extra == "cache-redis"
redis==3.5.3; extra == "cache-redis"
......
......@@ -13,7 +13,11 @@ import cachetools
import sre_parse
# Third-party modules
import esmre as esm
# Manually setup esmre==1.0.0
try:
import esmre as esm
except (ModuleNotFoundError, ImportError):
raise NotImplementedError("XRuleLookup needed ESMRE library for worked. Please, install it from pip")
import bitarray
# NOC modules
......
......@@ -87,7 +87,7 @@ def test_import(module):
try:
m = __import__(module, {}, {}, "*")
assert m
except ImportError as e:
except (ImportError, ModuleNotFoundError, NotImplementedError) as e:
if _allow_xfail(module):
pytest.xfail(str(e))
else:
......@@ -100,7 +100,7 @@ def test_module_empty_docstrings(module):
m = __import__(module, {}, {}, "*")
if m.__doc__ is not None and not m.__doc__.strip():
pytest.xfail("Module-level docstring must not be empty")
except ImportError as e:
except (ImportError, ModuleNotFoundError, NotImplementedError) as e:
if _allow_xfail(module):
pytest.xfail(str(e))
else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment