(self)
| 1082 | self.assertTrue(is_hardlink(pyc1, pyc2)) |
| 1083 | |
| 1084 | def test_duplicated_levels(self): |
| 1085 | # compile_dir() must not fail if optimize contains duplicated |
| 1086 | # optimization levels and/or if optimization levels are not sorted. |
| 1087 | with self.temporary_directory(): |
| 1088 | # code with no dostring and no assertion: |
| 1089 | # same bytecode for all optimization levels |
| 1090 | script = self.make_script(self.create_code()) |
| 1091 | self.compile_dir(optimize=[1, 0, 1, 0]) |
| 1092 | pyc1 = get_pyc(script, 0) |
| 1093 | pyc2 = get_pyc(script, 1) |
| 1094 | self.assertTrue(is_hardlink(pyc1, pyc2)) |
| 1095 | |
| 1096 | def test_recompilation(self): |
| 1097 | # Test compile_dir() when pyc files already exists and the script |
nothing calls this directly
no test coverage detected