Esempio n. 1
0
 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)
Esempio n. 2
0
 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'])
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)