tests: Fix the failing test that tries to open an incompatible index version.
This commit is contained in:
parent
41cdad4157
commit
2d6ecff430
@ -171,8 +171,14 @@ class TestFromDiskClass(object):
|
|||||||
# runs from the root directory
|
# runs from the root directory
|
||||||
assert Index.exists(PATH_TO_INDEX)
|
assert Index.exists(PATH_TO_INDEX)
|
||||||
|
|
||||||
def test_opens_from_dir(self):
|
def test_opens_from_dir_invalid_schema(self):
|
||||||
|
with pytest.raises(ValueError):
|
||||||
index = Index(schema(), PATH_TO_INDEX, reuse=True)
|
index = Index(schema(), PATH_TO_INDEX, reuse=True)
|
||||||
|
|
||||||
|
def test_opens_from_dir(self, dir_index):
|
||||||
|
index_dir, _ = dir_index
|
||||||
|
|
||||||
|
index = Index(schema(), str(index_dir), reuse=True)
|
||||||
assert index.searcher().num_docs == 3
|
assert index.searcher().num_docs == 3
|
||||||
|
|
||||||
def test_create_readers(self):
|
def test_create_readers(self):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user