(self)
| 48 | self.assertEqual(wc.filename, __file__) |
| 49 | |
| 50 | def test_open_wb(self): |
| 51 | p = self.root / 'fileA' |
| 52 | with magic_open(p, 'wb') as f: |
| 53 | #self.assertIsInstance(f, io.BufferedWriter) |
| 54 | f.write(b'this is file A\n') |
| 55 | self.assertEqual(self.ground.readbytes(p), b'this is file A\n') |
| 56 | self.assertRaises(ValueError, magic_open, p, 'wb', encoding='utf8') |
| 57 | self.assertRaises(ValueError, magic_open, p, 'wb', errors='strict') |
| 58 | self.assertRaises(ValueError, magic_open, p, 'wb', newline='') |
| 59 | |
| 60 | def test_write_bytes(self): |
| 61 | p = self.root / 'fileA' |
nothing calls this directly
no test coverage detected