Skip to content

Commit 8367ca0

Browse files
committed
🐛 (tests/manager) Make sure we emit what we emitted
1 parent 2ee4772 commit 8367ca0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/support.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,14 @@ def fixture(self, fixture_path):
6868
return path, entity
6969

7070
def get_emitted(self, schema=None):
71-
entities = self.manager.get_emitted()
71+
entities = list(self.manager.db.iterate())
72+
# test dehydrated emitted:
73+
emitted = self.manager.get_emitted()
74+
equal = {e.id for e in entities} == {e.id for e in emitted}
75+
if not equal:
76+
# special case of directory test: the child file is emitted in
77+
# another manager instance, but the Folder entity is there:
78+
assert len({e.id for e in entities} & {e.id for e in emitted}) == 1
7279
if schema is not None:
7380
entities = [e for e in entities if e.schema.is_a(schema)]
7481
return entities

0 commit comments

Comments
 (0)