Skip to content

Update os.environ['PYTHONPATH'] with the contents of pythonpath #10067

@xmo-odoo

Description

@xmo-odoo

What's the problem this feature will solve?

Basically what #9134 solved, with the addition of subprocesses being spawned by the SUT or being the SUT itself (I regularly use pytest for non-python utilities and the likes)

Describe the solution you'd like

That at the same time the content of pythonpath is prepended to sys.path, it's also prepended to os.environ['PYTHONPATH']

Alternative Solutions

python-dotenv has understandably rejected special support for PYTHONPATH (theskumar/python-dotenv#36). Though I guess pytest-dotenv might be open to that? I haven't found any mention of that on their bug tracker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions