(self)
| 923 | self.assertHasAttr(obj, "__dict__") |
| 924 | |
| 925 | def test_opener(self): |
| 926 | with self.open(os_helper.TESTFN, "w", encoding="utf-8") as f: |
| 927 | f.write("egg\n") |
| 928 | fd = os.open(os_helper.TESTFN, os.O_RDONLY) |
| 929 | def opener(path, flags): |
| 930 | return fd |
| 931 | with self.open("non-existent", "r", encoding="utf-8", opener=opener) as f: |
| 932 | self.assertEqual(f.read(), "egg\n") |
| 933 | |
| 934 | def test_bad_opener_negative_1(self): |
| 935 | # Issue #27066. |
nothing calls this directly
no test coverage detected