mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Kill execfile(), use exec() instead
This commit is contained in:
parent
41eaedd361
commit
016880229a
98 changed files with 179 additions and 341 deletions
|
|
@ -78,13 +78,6 @@ class TestGenericUnivNewlines(unittest.TestCase):
|
|||
data = fp.readlines()
|
||||
self.assertEqual(data, DATA_SPLIT[1:])
|
||||
|
||||
def test_execfile(self):
|
||||
namespace = {}
|
||||
execfile(test_support.TESTFN, namespace)
|
||||
func = namespace['line3']
|
||||
self.assertEqual(func.__code__.co_firstlineno, 3)
|
||||
self.assertEqual(namespace['line4'], FATX)
|
||||
|
||||
|
||||
class TestNativeNewlines(TestGenericUnivNewlines):
|
||||
NEWLINE = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue