Skip to content

Commit 8d37d53

Browse files
committed
Rename code to source (code could be confused with the code object)
1 parent 30983a5 commit 8d37d53

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/test/test_repl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ def spawn_repl(*args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, custom=F
7070

7171

7272
@contextmanager
73-
def temp_pythonstartup(*, code: str, histfile: str = ".pythonhist"):
73+
def temp_pythonstartup(*, source: str, histfile: str = ".pythonhist"):
7474
"""Create environment variables for a PYTHONSTARTUP script in a temporary directory."""
7575
with os_helper.temp_dir() as tmpdir:
7676
filename = os.path.join(tmpdir, "pythonstartup.py")
7777
with open(filename, "w") as f:
78-
f.write(code)
78+
f.write(source)
7979
yield {
8080
"PYTHONSTARTUP": filename,
8181
"PYTHON_HISTORY": os.path.join(tmpdir, histfile)
@@ -471,7 +471,7 @@ def test_quiet_mode(self):
471471
)
472472
def test_pythonstartup_failure(self, startup_code, expected_error):
473473
startup_env = self.enterContext(
474-
temp_pythonstartup(code=startup_code, histfile=".asyncio_history"))
474+
temp_pythonstartup(source=startup_code, histfile=".asyncio_history"))
475475

476476
p = spawn_repl(
477477
"-qm", "asyncio",

0 commit comments

Comments
 (0)