Skip to content

Commit

Permalink
Downgrade to pytest-django 3.8.0 for now (#23566)
Browse files Browse the repository at this point in the history
We'll upgrade this again along with pytest once pytest-dev/pytest#6925 is resolved.

Also, it looks like a flaky error in test class DB setup outside a transaction was mucking things up for the rest of the test shard. I didn't try to fix the flakiness, but this should at least limit the blast radius to just that test class. We really need to start using setUpTestData() more consistently.
  • Loading branch information
jmbowman committed Apr 1, 2020
1 parent c8663fa commit 9ef0aa4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Expand Up @@ -27,8 +27,8 @@ class TestEnterpriseCourseEnrollmentCreateOldOrder(TestCase):
"""

@classmethod
def setUpClass(cls):
super(TestEnterpriseCourseEnrollmentCreateOldOrder, cls).setUpClass()
def setUpTestData(cls):
super(TestEnterpriseCourseEnrollmentCreateOldOrder, cls).setUpTestData()
UserFactory(username=TEST_ECOMMERCE_WORKER)
cls.enrollment_count = 30
cls._create_enterprise_course_enrollments(30)
Expand Down
4 changes: 4 additions & 0 deletions requirements/constraints.txt
Expand Up @@ -67,6 +67,10 @@ path<13.2.0
# BOM-1430: pytest 5.4.0 breaks reporting sometimes: https://github.com/pytest-dev/pytest/issues/6925
pytest<5.4.0

# pytest-django 3.9.0 has a fix for pytest 5.4.0+ that breaks cleanup after failed tests in earlier pytest versions
# https://github.com/pytest-dev/pytest-django/issues/824
pytest-django<3.9.0

# Upgrading to 2.5.3 on 2020-01-03 triggered "'tzlocal' object has no attribute '_std_offset'" errors in production
python-dateutil==2.4.0

Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/development.txt
Expand Up @@ -244,7 +244,7 @@ pyrsistent==0.16.0 # via jsonschema
pysrt==1.1.2 # via -r requirements/edx/testing.txt, edxval
pytest-attrib==0.1.3 # via -r requirements/edx/testing.txt
pytest-cov==2.8.1 # via -r requirements/edx/testing.txt
pytest-django==3.9.0 # via -r requirements/edx/testing.txt
pytest-django==3.8.0 # via -r requirements/edx/testing.txt
pytest-forked==1.1.3 # via -r requirements/edx/testing.txt, pytest-xdist
pytest-json-report==1.2.1 # via -r requirements/edx/testing.txt
pytest-metadata==1.8.0 # via -r requirements/edx/testing.txt, pytest-json-report
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/testing.txt
Expand Up @@ -232,7 +232,7 @@ pyquery==1.4.1 # via -r requirements/edx/testing.in
pysrt==1.1.2 # via -r requirements/edx/base.txt, edxval
pytest-attrib==0.1.3 # via -r requirements/edx/testing.in
pytest-cov==2.8.1 # via -r requirements/edx/testing.in
pytest-django==3.9.0 # via -r requirements/edx/testing.in
pytest-django==3.8.0 # via -r requirements/edx/testing.in
pytest-forked==1.1.3 # via pytest-xdist
pytest-json-report==1.2.1 # via -r requirements/edx/testing.in
pytest-metadata==1.8.0 # via pytest-json-report
Expand Down

0 comments on commit 9ef0aa4

Please sign in to comment.