Skip to content

Commit

Permalink
Fix test bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Jan 4, 2025
1 parent e75f1e8 commit c27c12a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,8 @@ def test_stream_input(self) -> None:

def test_empty_stream(self) -> None:
"""Assert empty stream raises exception"""
self.assertRaises(RTreeError, index.Index, iter(()))
with self.assertRaises(RTreeError):
index.Index(stream=iter(()))

def test_exception_in_generator(self) -> None:
"""Assert exceptions raised in callbacks are raised in main thread"""
Expand Down Expand Up @@ -856,6 +857,7 @@ def test_custom_storage_reopening(self) -> None:
del r1
self.assertTrue(storage.hasData)

settings.overwrite = False
r2 = index.Index(storage=storage, properties=settings)
count = r2.count((0, 0, 10, 10))
self.assertEqual(count, 1)

0 comments on commit c27c12a

Please sign in to comment.