-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
When running test with https://github.com/s-yata/marisa-trie/releases/tag/v0.3.1 I get these errors because custom errors like MARISA_FORMAT_ERROR was removed in s-yata/marisa-trie#114
Perhaps the testcases should be update to something like assert "MARISA_FORMAT_ERROR in e.args[0] or "std::runtime_error" in e.args[0]"
======================================================================================================== FAILURES =========================================================================================================
____________________________________________________________________________________________________ test_invalid_file ____________________________________________________________________________________________________
def test_invalid_file():
try:
> marisa_trie.BinaryTrie().load(__file__)
tests/test_binary_trie.py:254:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/marisa_trie.pyx:231: in marisa_trie._Trie.load
with open(path, 'r') as f:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> self._trie.read(f.fileno())
E RuntimeError: /build/source/lib/marisa/grimoire/trie/header.h:29: std::runtime_error: !test_header(buf)
src/marisa_trie.pyx:232: RuntimeError
During handling of the above exception, another exception occurred:
def test_invalid_file():
try:
marisa_trie.BinaryTrie().load(__file__)
except RuntimeError as e:
> assert "MARISA_FORMAT_ERROR" in e.args[0]
E AssertionError: assert 'MARISA_FORMAT_ERROR' in '/build/source/lib/marisa/grimoire/trie/header.h:29: std::runtime_error: !test_header(buf)'
tests/test_binary_trie.py:256: AssertionError
____________________________________________________________________________________________________ test_invalid_file ____________________________________________________________________________________________________
def test_invalid_file():
try:
> marisa_trie.Trie().load(__file__)
tests/test_trie.py:322:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/marisa_trie.pyx:231: in marisa_trie._Trie.load
with open(path, 'r') as f:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> self._trie.read(f.fileno())
E RuntimeError: /build/source/lib/marisa/grimoire/trie/header.h:29: std::runtime_error: !test_header(buf)
src/marisa_trie.pyx:232: RuntimeError
During handling of the above exception, another exception occurred:
def test_invalid_file():
try:
marisa_trie.Trie().load(__file__)
except RuntimeError as e:
> assert "MARISA_FORMAT_ERROR" in e.args[0]
E AssertionError: assert 'MARISA_FORMAT_ERROR' in '/build/source/lib/marisa/grimoire/trie/header.h:29: std::runtime_error: !test_header(buf)'
tests/test_trie.py:324: AssertionError
================================================================================================= short test summary info =================================================================================================
FAILED tests/test_binary_trie.py::test_invalid_file - AssertionError: assert 'MARISA_FORMAT_ERROR' in '/build/source/lib/marisa/grimoire/trie/header.h:29: std::runtime_error: !test_header(buf)'
FAILED tests/test_trie.py::test_invalid_file - AssertionError: assert 'MARISA_FORMAT_ERROR' in '/build/source/lib/marisa/grimoire/trie/header.h:29: std::runtime_error: !test_header(buf)'
============================================================================================== 2 failed, 68 passed in 3.15s ===============================================================================================
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels