Example #1
0
 def test_pipe(self):
     with uio.open(dataFolder / 'lines.txt') as lines:
         cleanup, stop = lines.pipe(self.f)
         stop.wait()
         cleanup()
         self.assertEqual(self.read(),
                          'first line\nsecond line\nthird line\nend\n')
Example #2
0
 def setUp(self):
     fd, self.path = tempfile.mkstemp(prefix='uiotest-')
     os.close(fd)
     self.f = uio.open(self.path, 'r+')
Example #3
0
 def setUp(self):
     self.f = uio.open(dataFolder / 'lines.txt', 'rb')
Example #4
0
 def test_pipe_block(self):
     with uio.open(dataFolder / 'lines.txt') as lines:
         lines = uio.open(dataFolder / 'lines.txt')
         lines.pipe(self.f, block=True)
         self.assertEqual(self.read(),
                          'first line\nsecond line\nthird line\nend\n')
Example #5
0
 def setUp(self):
     self.f = uio.open(dataFolder / 'broken-uni.txt')