Skip to content

Commit

Permalink
Merge pull request #3358 from stefanor/relative-pythonpath
Browse files Browse the repository at this point in the history
autoreload_test: Handle a relative PYTHONPATH
  • Loading branch information
bdarnell authored Jun 12, 2024
2 parents 10880af + 11b8910 commit bdfc017
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tornado/test/autoreload_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,13 @@ def write_files(self, tree, base_path=None):
def run_subprocess(self, args):
# Make sure the tornado module under test is available to the test
# application
pythonpath = os.getcwd()
parts = [os.getcwd()]
if "PYTHONPATH" in os.environ:
pythonpath += os.pathsep + os.environ["PYTHONPATH"]
parts += [
os.path.join(os.getcwd(), part)
for part in os.environ["PYTHONPATH"].split(os.pathsep)
]
pythonpath = os.pathsep.join(parts)

p = Popen(
args,
Expand Down

0 comments on commit bdfc017

Please sign in to comment.