def test_node(self): with temporary_directory() as storedir: store = Store(storedir, {}) dataset = make_dataset(self.BAGS) store.add_dataset(dataset) sink1 = make_sink(fulltext) sink2 = make_sink(collect) run_nodes(dataset, [sink1, sink2], store) assert 'hello' in sink1.stream[0].words assert any('hello' in x for x in sink2.stream)
def test_node(self): with temporary_directory() as storedir: store = Store(storedir, PERSIST) dataset = make_dataset(self.BAGS) store.add_dataset(dataset) sink = make_sink(node) run_nodes(dataset, [sink], store, PERSIST) self.assertNodeOutput(sink.stream, node)
def test_node(self): with temporary_directory() as storedir: store = Store(storedir, {}) dataset = make_dataset(self.BAGS) store.add_dataset(dataset) sink = make_sink(collect) run_nodes(dataset, [sink], store) self.assertEquals(sink.stream, ['Success'])
def test_node(self): with temporary_directory() as storedir: store = Store(storedir, {}) dataset = make_dataset(self.BAGS) store.add_dataset(dataset) sink = make_sink(node) run_nodes(dataset, [sink], store) self.assertEqual(len(sink.stream), 0)