Skip to content

Add support for serialized rollback #721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

luzfcb
Copy link

@luzfcb luzfcb commented Apr 26, 2019

Fixes #329.

TODO:

  • add test(s)

This is the code made by @blueyed in #353 with some additional inspired by #619

This issue reported by @aaugustin seems to be a blocker
https://code.djangoproject.com/ticket/26552

@luzfcb
Copy link
Author

luzfcb commented Apr 26, 2019

Is there any particular reason for the current Travis-ci configuration only testing against MySQL using Python2.7 + Django 1.11, and not testing against the new versions of django and python3?

@blueyed
Copy link
Contributor

blueyed commented Apr 26, 2019

Is there any particular reason for the current Travis-ci configuration only testing against MySQL using Python2.7 + Django 1.11, and not testing against the new versions of django and python3?

It is meant to have a smaller build matrix.

@lapp0
Copy link

lapp0 commented Oct 30, 2019

Your branch gives me this warning:

  /nix/store/ih3aih50m19mdhlr07f1lhandghj07qv-python3.7-pytest-django-3.5.1/lib/python3.7/site-packages/pytest_django/fixtures.py:223: PytestDeprecationWarning: The `funcargnames` attribute was an alias for `fixturenames`, since pytest 2.3 - use the newer attribute instead.
    if "django_db_serialized_rollback" in request.funcargnames:

This is a very important PR for me, thanks for implementing it!

@luzfcb luzfcb force-pushed the fix-issue-329-serialized-rollback branch 3 times, most recently from e310075 to c6565b7 Compare October 30, 2019 21:03
@luzfcb
Copy link
Author

luzfcb commented Oct 31, 2019

@lapp0 Thanks for pointing me the warnings. I already fix the code.

Anyway, a key duplication error is occurring, however, this seems to be erratic behavior since the same commit causes the test suite to fail differently on two different instances of travis-ci

https://travis-ci.org/pytest-dev/pytest-django/builds/605222978

https://travis-ci.org/luzfcb/pytest-django/builds/605222952

@luzfcb luzfcb force-pushed the fix-issue-329-serialized-rollback branch from 3a49c05 to c6565b7 Compare November 4, 2019 13:41
@luzfcb
Copy link
Author

luzfcb commented Apr 21, 2020

@aleehedl
Copy link

aleehedl commented Apr 22, 2020

@luzfcb Apart from resolving conflicts and adding tests, is there something else that needs to be done before this is ready for merging?

Has someone come up with some kind of a temporary workaround for this problem before this PR is finalized?

@coiax
Copy link

coiax commented May 7, 2020

@aleehedl There are a number of work arounds in the comments of #329, although I haven't used any of them.

@daniel-ruiz
Copy link

@luzfcb Hi! I found this PR after encountering an error in a large Django test suite and it would be fantastic to count on this feature to solve that problem!
Can I help in moving this forward? I'm not knowledgeable of pytest's internals, so I'd appreciate some pointers in order to get started 😄

bluetech added a commit to bluetech/pytest-django that referenced this pull request Nov 29, 2021
Thanks to Aymeric Augustin, Daniel Hahler and Fábio C. Barrionuevo da
Luz for previous work on this feature.

Fix pytest-dev#329.
Closes pytest-dev#353.
Closes pytest-dev#721.
Closes pytest-dev#919.
Closes pytest-dev#956.
bluetech added a commit to bluetech/pytest-django that referenced this pull request Nov 29, 2021
Thanks to Aymeric Augustin, Daniel Hahler and Fábio C. Barrionuevo da
Luz for previous work on this feature.

Fix pytest-dev#329.
Closes pytest-dev#353.
Closes pytest-dev#721.
Closes pytest-dev#919.
Closes pytest-dev#956.
bluetech added a commit to bluetech/pytest-django that referenced this pull request Nov 29, 2021
Thanks to Aymeric Augustin, Daniel Hahler and Fábio C. Barrionuevo da
Luz for previous work on this feature.

Fix pytest-dev#329.
Closes pytest-dev#353.
Closes pytest-dev#721.
Closes pytest-dev#919.
Closes pytest-dev#956.
bluetech added a commit to bluetech/pytest-django that referenced this pull request Nov 29, 2021
Thanks to Aymeric Augustin, Daniel Hahler and Fábio C. Barrionuevo da
Luz for previous work on this feature.

Fix pytest-dev#329.
Closes pytest-dev#353.
Closes pytest-dev#721.
Closes pytest-dev#919.
Closes pytest-dev#956.
bluetech added a commit to bluetech/pytest-django that referenced this pull request Nov 29, 2021
Thanks to Aymeric Augustin, Daniel Hahler and Fábio C. Barrionuevo da
Luz for previous work on this feature.

Fix pytest-dev#329.
Closes pytest-dev#353.
Closes pytest-dev#721.
Closes pytest-dev#919.
Closes pytest-dev#956.
bluetech added a commit to bluetech/pytest-django that referenced this pull request Nov 29, 2021
Thanks to Aymeric Augustin, Daniel Hahler and Fábio C. Barrionuevo da
Luz for previous work on this feature.

Fix pytest-dev#329.
Closes pytest-dev#353.
Closes pytest-dev#721.
Closes pytest-dev#919.
Closes pytest-dev#956.
@bluetech
Copy link
Member

A PR which will replace this PR is in #970. I intend to merge and release it in a few days. Comments and tests are welcome.

bluetech added a commit to bluetech/pytest-django that referenced this pull request Dec 1, 2021
Thanks to Aymeric Augustin, Daniel Hahler and Fábio C. Barrionuevo da
Luz for previous work on this feature.

Fix pytest-dev#329.
Closes pytest-dev#353.
Closes pytest-dev#721.
Closes pytest-dev#919.
Closes pytest-dev#956.
@bluetech bluetech closed this in #970 Dec 1, 2021
bluetech added a commit that referenced this pull request Dec 1, 2021
Thanks to Aymeric Augustin, Daniel Hahler and Fábio C. Barrionuevo da
Luz for previous work on this feature.

Fix #329.
Closes #353.
Closes #721.
Closes #919.
Closes #956.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests using live_server fixture removing data from data migrations
7 participants