Skip to content
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

Db copy #38

Closed
wants to merge 2 commits into from
Closed

Db copy #38

wants to merge 2 commits into from

Conversation

RonnyPfannschmidt
Copy link
Member

efforts to finish a implementation of db copying and other reuse patterns
this pr is mostly for review

@blueyed
Copy link
Contributor

blueyed commented Jul 9, 2014

@RonnyPfannschmidt
This PR looks good to me. Given that it's a bit older already, are you still satisfied with these changes?

(I can add the missing comment when merging it.)

@blueyed
Copy link
Contributor

blueyed commented Jul 9, 2014

FYI: I have pushed the merge to https://github.com/blueyed/pytest_django/compare/merge-RonnyPfannschmidt-db-copy for now.

@blueyed
Copy link
Contributor

blueyed commented Jul 9, 2014

I have a local change, where I moved all the Django related imports into django_testdir.

IIRC this makes pytest (with pytest-django installed) behave better if you have DJANGO_SETTINGS_MODULE defined, but are not using it for a/this Django project.

-from django.conf import settings
-
-
-# Trigger loading of Django settings, which might raise pytest.UsageError.
-from .db_helpers import (create_empty_production_database, get_db_engine,
-                         DB_NAME)
-
-
 @pytest.fixture(scope='function')
 def django_testdir(request, testdir, monkeypatch):
+    # Trigger loading of Django settings, which might raise pytest.UsageError.
+    from django.conf import settings
+    from .db_helpers import (create_empty_production_database, get_db_engine,
+                             DB_NAME)
+

@pelme
Copy link
Member

pelme commented Jul 10, 2014

Hmm, this PR does not really do anything yet, right?

Anyways, supporting db copy/custom reuse patterns is the main objective of my fixturefix-branch, see my comment in #128.

@santagada
Copy link

@RonnyPfannschmidt any ideas on how to move this pull-request forward?

@RonnyPfannschmidt
Copy link
Member Author

im pretty out of it atm, came out of a work effort and probably wont pick up in the next 2-3 months

@pelme
Copy link
Member

pelme commented Jul 25, 2015

I close this PR for now, I still have plans to make use cases like this easy to implement. Feel free to just reopen it if you want to continue working on it!

@pelme pelme closed this Jul 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants