Esempio n. 1
0
 def test_repr(self):
     self.assertEquals("<FileLike (read)>",
                       repr(__unit__.FileLike(read=True, write=None)))
     self.assertEquals("<FileLike (read,write)>",
                       repr(__unit__.FileLike(read=True, write=True)))
     self.assertEquals("<FileLike (noread)>",
                       repr(__unit__.FileLike(read=False, write=None)))
     self.assertEquals("<FileLike (noread,nowrite)>",
                       repr(__unit__.FileLike(read=False, write=False)))
Esempio n. 2
0
 def assert_no_match(self, value, *args, **kwargs):
     return super(FileLike, self) \
         .assert_no_match(__unit__.FileLike(*args, **kwargs), value)
Esempio n. 3
0
 def test_ctor(self):
     with self.assertRaises(ValueError):
         __unit__.FileLike(read=None, write=None)