예제 #1
0
 def test_read(self):
     s = repos.Stream()
     if repos.api_version() < (1, 6):
         self.assertRaises(NotImplementedError, s.read)
     else:
         self.assertEqual("", s.read())
         self.assertEqual("", s.read(15))
     s.close()
예제 #2
0
 def test_write(self):
     s = repos.Stream()
     self.assertEqual(0, s.write(""))
     self.assertEqual(2, s.write("ab"))
     s.close()
예제 #3
0
 def test_read(self):
     s = repos.Stream()
     self.assertEqual(b"", s.read())
     self.assertEqual(b"", s.read(15))
     s.close()