summaryrefslogtreecommitdiffstats
path: root/Lib/test/badsyntax_future3.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-06-12 08:44:06 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-06-12 08:44:06 (GMT)
commit179f960d47dc9f2c18e5b535db63fb70b21fc3ea (patch)
treeaa4988b55963881faaab7671a4bd0609cd5dc32b /Lib/test/badsyntax_future3.py
parentcbe6142135667f045a21264619a61d74a9a1ff67 (diff)
downloadcpython-179f960d47dc9f2c18e5b535db63fb70b21fc3ea.zip
cpython-179f960d47dc9f2c18e5b535db63fb70b21fc3ea.tar.gz
cpython-179f960d47dc9f2c18e5b535db63fb70b21fc3ea.tar.bz2
Issue #25455: Fixed a crash in repr of recursive functools.partial objects.
Diffstat (limited to 'Lib/test/badsyntax_future3.py')
0 files changed, 0 insertions, 0 deletions
opt">] # In these tests we compute relative paths. When using Windows, the # current working directory path and the 'self.source_path' might be # on different drives. Therefore we need to switch to the drive where # the temporary source file lives. drive = os.path.splitdrive(self.source_path)[0] if drive: os.chdir(drive) with open(self.source_path, 'w') as file: file.write('x = 123\n') def tearDown(self): shutil.rmtree(self.directory) if self.cwd_drive: os.chdir(self.cwd_drive) def test_absolute_path(self): py_compile.compile(self.source_path, self.pyc_path) self.assertTrue(os.path.exists(self.pyc_path)) self.assertFalse(os.path.exists(self.cache_path)) def test_cache_path(self): py_compile.compile(self.source_path) self.assertTrue(os.path.exists(self.cache_path)) def test_cwd(self): cwd = os.getcwd() os.chdir(self.directory) py_compile.compile(os.path.basename(self.source_path), os.path.basename(self.pyc_path)) os.chdir(cwd) self.assertTrue(os.path.exists(self.pyc_path)) self.assertFalse(os.path.exists(self.cache_path)) def test_relative_path(self): py_compile.compile(os.path.relpath(self.source_path), os.path.relpath(self.pyc_path)) self.assertTrue(os.path.exists(self.pyc_path)) self.assertFalse(os.path.exists(self.cache_path)) def test_main(): support.run_unittest(PyCompileTests) if __name__ == "__main__": test_main()