Improve Python Path setup when running unit tests.

Review Request #12314 — Created June 1, 2022 and submitted

Information

Django Evolution
release-2.x

Reviewers

This makes three changes designed to help ensure the right environment
is in use when running unit tests:

  1. conftest.py now sets the Python Path before importing django or
    pytest, helping avoid anything important from loading before we
    have the correct path.

  2. pytest is now told to use the current directory as the default
    Python Path.

  3. To enable that, we now depend on pytest~=7.1.2 on Python 3.

Unit tests pass.

Summary ID
Improve Python Path setup when running unit tests.
This makes three changes designed to help ensure the right environment is in use when running unit tests: 1. `conftest.py` now sets the Python Path before importing `django` or `pytest`, helping avoid anything important from loading before we have the correct path. 2. `pytest` is now told to use the current directory as the default Python Path. 3. To enable that, we now depend on `pytest~=7.1.2` on Python 3.
b6dc05e448802f34a77351d3448b0ef7cd41c6ac
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.x (4e615ae)
Loading...