Bump pytest version and add current directory to python path

Review Request #12288 — Created May 18, 2022 and submitted

Information

Djblets
release-3.x

Reviewers

Running unit tests using pytest <args> was broken because pytest was importing
test.settings from Django Evolution instead of from Djblets. This happened
because pytest does not add the current directory to the Python Path, so
depending on the order in which Django Evolution and Djblets were installed and
registered in the Python Path, the wrong test.settings module could be picked
up. To fix this we update our pytest to the latest version (any version >7
works) and set pytest's pythonpath config variable to include the current
directory.

Ran ./setup.py develop --all-pyvers to ensure that pytest 7.1.2 was
installed and successfully ran unit tests using pytest djblets/forms/tests

Summary ID Author
Bump pytest version and add current directory to python path
d751f691848093758aea227a8c48460ddcb05b76 Michelle
Description From Last Updated

To be more specific as to the cause, depending on the order in which Django Evolution and Djblets were installed …

chipx86chipx86

Small nits in the description: "python" -> "Python" "djblets" -> "Djblets" "django-evolution" -> "Django Evolution" And let's use backticks around …

chipx86chipx86
chipx86
  1. 
      
  2. Show all issues

    To be more specific as to the cause, depending on the order in which Django Evolution and Djblets were installed and registered in the Python Path, the wrong test.settings module could be picked up. That'll be an important part of the reason for this issue.

  3. Show all issues

    Small nits in the description:

    "python" -> "Python"
    "djblets" -> "Djblets"
    "django-evolution" -> "Django Evolution"

    And let's use backticks around pythonpath, as it's a configuration entry and not a term.

  4. 
      
maubin
david
  1. Ship It!
  2. 
      
maubin
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.x (6c9c448)