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()
def test_write(self): s = repos.Stream() self.assertEqual(0, s.write("")) self.assertEqual(2, s.write("ab")) s.close()
def test_read(self): s = repos.Stream() self.assertEqual(b"", s.read()) self.assertEqual(b"", s.read(15)) s.close()