| 754 | self.assertRaises(OSError, zi.get_data, os.path.join(TEMP_ZIP, 'a', 'b')) |
| 755 | |
| 756 | def testImporterAttr(self): |
| 757 | src = """if 1: # indent hack |
| 758 | def get_file(): |
| 759 | return __file__ |
| 760 | if __loader__.get_data("some.data") != b"some data": |
| 761 | raise AssertionError("bad data")\n""" |
| 762 | pyc = make_pyc(compile(src, "<???>", "exec"), NOW, len(src)) |
| 763 | files = {TESTMOD + pyc_ext: pyc, |
| 764 | "some.data": "some data"} |
| 765 | self.doTest(pyc_ext, files, TESTMOD, prefix='') |
| 766 | |
| 767 | def testDefaultOptimizationLevel(self): |
| 768 | # zipimport should use the default optimization level (#28131) |