(self)
| 640 | self.assertHasAttr(obj, "__dict__") |
| 641 | |
| 642 | def test_opener(self): |
| 643 | with self.open(os_helper.TESTFN, "w", encoding="utf-8") as f: |
| 644 | f.write("egg\n") |
| 645 | fd = os.open(os_helper.TESTFN, os.O_RDONLY) |
| 646 | def opener(path, flags): |
| 647 | return fd |
| 648 | with self.open("non-existent", "r", encoding="utf-8", opener=opener) as f: |
| 649 | self.assertEqual(f.read(), "egg\n") |
| 650 | |
| 651 | def test_bad_opener_negative_1(self): |
| 652 | # Issue #27066. |
nothing calls this directly
no test coverage detected