The actual error: ====================================================================== FAIL: test_exceptions_propagate (test.test_py_compile.PyCompileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tank/libs/cpython/Lib/test/test_py_compile.py", line 88, in test_exceptions_propagate py_compile.compile(self.source_path, self.pyc_path) AssertionError: OSError not raised ---------------------------------------------------------------------- Ran 7 tests in 0.007s FAILED (failures=1) test test_py_compile failed 1 test failed: test_py_compile os.chmod(self.directory, stat.S_IREAD) doesn't do what it is expected on FreeBSD for root user, the attached patch skips this test if the current user is root.
The test also fails for root user on Linux: $ sudo ./python Lib/test/test_py_compile.py .....F. ====================================================================== FAIL: test_exceptions_propagate (__main__.PyCompileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_py_compile.py", line 92, in test_exceptions_propagate py_compile.compile(self.source_path, self.pyc_path) AssertionError: OSError not raised