#33256: Some schema tests don't clean up their tables
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: banani720
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Ayush Joshi):
Replying to [comment:4 Mariusz Felisiak]:
> > If I have not done all of the cases yet, but just want to check in to
see if I am going about this the correct way, should I still submit a pr?
>
> I don't think there is a need to submit PR at this stage. You should be
able to [https://docs.djangoproject.com/en/3.2/internals/contributing
/writing-code/unit-tests/ run tests locally] and check that all `schema`
tests work:
> {{{
> ./runtests.py --settings=test_postgres --parallel=1 --keepdb schema
> }}}
> I'd submit PR when all test pass.
When I run this command I don't know why but I'm getting the following
{{{ModuleNotFoundError}}}, could you please help?
{{{
Testing against Django installed in '/Python/django/django'
Traceback (most recent call last):
File "./runtests.py", line 657, in <module>
failures = django_tests(
File "./runtests.py", line 348, in django_tests
test_labels, state = setup_run_tests(verbosity, start_at, start_after,
test_labels)
File "./runtests.py", line 278, in setup_run_tests
test_modules, state = setup_collect_tests(start_at, start_after,
test_labels=test_labels)
File "./runtests.py", line 193, in setup_collect_tests
'INSTALLED_APPS': settings.INSTALLED_APPS,
File "/Python/django/django/conf/__init__.py", line 89, in __getattr__
self._setup(name)
File "/Python/django/django/conf/__init__.py", line 76, in _setup
self._wrapped = Settings(settings_module)
File "/Python/django/django/conf/__init__.py", line 184, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in
_find_and_load_unlocked
ModuleNotFoundError: No module named 'test_postgres'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33256#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.20dddcba0f614a5e522931b5d889cdb3%40djangoproject.com.