We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
IDK whether it's due to the recent pytest release or django, but since recently, tests in tests/test_dumpscript.py all fail.
tests/test_dumpscript.py
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-extensions/build; python3.11 -m pytest --no-cov --ignore=tests/management/commands/test_pipchecker.py django_extensions tests ============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.1.1, pluggy-1.5.0 django: settings: tests.testapp.settings (from ini) rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-extensions/build configfile: setup.cfg plugins: Faker-24.4.0, cov-4.1.0, django-4.5.2 collected 522 items / 1 skipped tests/auth/test_mixins.py .. [ 0%] tests/db/fields/test_uniq_field_mixin.py ....... [ 1%] tests/db/fields/test_uniq_field_mixin_compat.py ....... [ 3%] tests/jobs/daily/test_cache_cleanup.py .. [ 3%] tests/management/commands/shell_plus_tests/test_collision_resolver.py .. [ 3%] ........................ [ 8%] tests/management/commands/shell_plus_tests/test_import_subclasses.py ... [ 9%] ........ [ 10%] tests/management/commands/shell_plus_tests/test_shell_plus.py .. [ 10%] tests/management/commands/test_admin_generator.py .... [ 11%] tests/management/commands/test_clear_cache.py ...... [ 12%] tests/management/commands/test_create_command.py .... [ 13%] tests/management/commands/test_create_jobs.py .... [ 14%] tests/management/commands/test_create_template_tags.py ... [ 14%] tests/management/commands/test_delete_squashed_migrations.py XXXXXxxXxx [ 16%] tests/management/commands/test_describe_form.py .... [ 17%] tests/management/commands/test_drop_test_database.py ............. [ 20%] tests/management/commands/test_export_emails.py ......... [ 21%] tests/management/commands/test_generate_secret_key.py . [ 22%] tests/management/commands/test_graph_models.py .......... [ 23%] tests/management/commands/test_list_signals.py . [ 24%] tests/management/commands/test_managestate.py ............... [ 27%] tests/management/commands/test_print_user_for_session.py ...... [ 28%] tests/management/commands/test_reset_db.py ............ [ 30%] tests/management/commands/test_reset_schema.py .... [ 31%] tests/management/commands/test_runjob.py ......... [ 32%] tests/management/commands/test_runserver_plus.py . [ 33%] tests/management/commands/test_set_default_site.py ........... [ 35%] tests/management/commands/test_set_fake_emails.py ......... [ 36%] tests/management/commands/test_set_fake_passwords.py .... [ 37%] tests/management/commands/test_show_urls.py .......... [ 39%] tests/management/commands/test_sqlcreate.py ....... [ 40%] tests/management/commands/test_sqldsn.py ............. [ 43%] tests/management/commands/test_sync_s3.py ........... [ 45%] tests/management/commands/test_syncdata.py ........ [ 47%] tests/management/commands/test_unreferenced_files.py .... [ 47%] tests/management/commands/test_update_permissions.py .... [ 48%] tests/management/commands/test_validate_templates.py .... [ 49%] tests/management/test_email_notifications.py .... [ 50%] tests/templatetags/test_highlighting.py .... [ 50%] tests/templatetags/test_indent_text.py .... [ 51%] tests/templatetags/test_syntax_color.py ........ [ 53%] tests/test_admin_filter.py ..... [ 54%] tests/test_admin_widgets.py . [ 54%] tests/test_autoslug_fields.py .......................... [ 59%] tests/test_clean_pyc.py ... [ 59%] tests/test_compat.py ... [ 60%] tests/test_compile_pyc.py .. [ 60%] tests/test_dumpscript.py FFFFF [ 61%] tests/test_find_template.py .. [ 62%] tests/test_json_field.py .......... [ 64%] tests/test_logging_filters.py ... [ 64%] tests/test_management_command.py ...................... [ 68%] tests/test_models.py ...... [ 70%] tests/test_modificationdatetime_fields.py ... [ 70%] tests/test_parse_mysql_cnf.py ... [ 71%] tests/test_randomchar_field.py ............ [ 73%] tests/test_runscript.py .................................... [ 80%] tests/test_shortuuid_field.py .... [ 81%] tests/test_sqldiff.py ...sss... [ 82%] tests/test_template_rendering.py .. [ 83%] tests/test_templatetags.py ... [ 83%] tests/test_timestamped_model.py .. [ 84%] tests/test_validators.py ...... [ 85%] tests/test_version.py ... [ 86%] django_extensions/management/shells.py . [ 86%] django_extensions/templatetags/widont.py .. [ 86%] tests/management/commands/shell_plus_tests/test_shell_plus.py ........ [ 88%] tests/management/commands/test_generate_password.py .. [ 88%] tests/management/commands/test_graph_models.py .... [ 89%] tests/management/commands/test_mail_debug.py . [ 89%] tests/management/commands/test_notes.py .... [ 90%] tests/management/commands/test_print_settings.py ....... [ 91%] tests/management/commands/test_raise_test_exception.py . [ 91%] tests/management/commands/test_set_fake_emails.py . [ 91%] tests/management/commands/test_set_fake_passwords.py . [ 92%] tests/management/commands/test_show_template_tags.py ... [ 92%] tests/management/commands/test_validate_templates.py . [ 92%] tests/management/test_modelviz.py .... [ 93%] tests/test_color.py .. [ 94%] tests/test_runserver.py .................... [ 97%] tests/test_validators.py ........... [100%] =================================== FAILURES =================================== _____________________ DumpScriptTests.test_replaced_stderr _____________________ self = <django.db.backends.utils.CursorWrapper object at 0x7f7aea6ea150> sql = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () ignored_wrapper_args = (False, {'connection': <DatabaseWrapper vendor='sqlite' alias='default'>, 'cursor': <django.db.backends.utils.CursorWrapper object at 0x7f7aea6ea150>}) def _execute(self, sql, params, *ignored_wrapper_args): self.db.validate_no_broken_transaction() with self.db.wrap_database_errors: if params is None: # params default might be backend specific. return self.cursor.execute(sql) else: > return self.cursor.execute(sql, params) /usr/lib/python3/dist-packages/django/db/backends/utils.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <django.db.backends.sqlite3.base.SQLiteCursorWrapper object at 0x7f7aea50c050> query = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () def execute(self, query, params=None): if params is None: return super().execute(query) # Extract names if params is a mapping, i.e. "pyformat" style is used. param_names = list(params) if isinstance(params, Mapping) else None query = self.convert_query(query, param_names=param_names) > return super().execute(query, params) E sqlite3.OperationalError: no such table: django_extensions_permmodel /usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py:328: OperationalError The above exception was the direct cause of the following exception: self = <tests.test_dumpscript.DumpScriptTests testMethod=test_replaced_stderr> def test_replaced_stderr(self): # check if stderr can be replaced, without changing stdout n = Name(name='Fred') n.save() tmp_err = StringIO() sys.stderr = StringIO() > call_command('dumpscript', 'django_extensions', stderr=tmp_err) tests/test_dumpscript.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/django/core/management/__init__.py:194: in call_command return command.execute(*args, **defaults) /usr/lib/python3/dist-packages/django/core/management/base.py:458: in execute output = self.handle(*args, **options) django_extensions/management/utils.py:62: in inner ret = func(self, *args, **kwargs) django_extensions/management/commands/dumpscript.py:118: in handle self.stdout.write(str(script)) django_extensions/management/commands/dumpscript.py:181: in __str__ return flatten_blocks(self.lines, num_indents=self.indent) django_extensions/management/commands/dumpscript.py:475: in get_lines code.append(model_class.lines) django_extensions/management/commands/dumpscript.py:219: in get_lines for counter, item in enumerate(self.model._default_manager.all()): /usr/lib/python3/dist-packages/django/db/models/query.py:398: in __iter__ self._fetch_all() /usr/lib/python3/dist-packages/django/db/models/query.py:1881: in _fetch_all self._result_cache = list(self._iterable_class(self)) /usr/lib/python3/dist-packages/django/db/models/query.py:91: in __iter__ results = compiler.execute_sql( /usr/lib/python3/dist-packages/django/db/models/sql/compiler.py:1562: in execute_sql cursor.execute(sql, params) /usr/lib/python3/dist-packages/django/db/backends/utils.py:67: in execute return self._execute_with_wrappers( /usr/lib/python3/dist-packages/django/db/backends/utils.py:80: in _execute_with_wrappers return executor(sql, params, many, context) /usr/lib/python3/dist-packages/django/db/backends/utils.py:84: in _execute with self.db.wrap_database_errors: /usr/lib/python3/dist-packages/django/db/utils.py:91: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/lib/python3/dist-packages/django/db/backends/utils.py:89: in _execute return self.cursor.execute(sql, params) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <django.db.backends.sqlite3.base.SQLiteCursorWrapper object at 0x7f7aea50c050> query = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () def execute(self, query, params=None): if params is None: return super().execute(query) # Extract names if params is a mapping, i.e. "pyformat" style is used. param_names = list(params) if isinstance(params, Mapping) else None query = self.convert_query(query, param_names=param_names) > return super().execute(query, params) E django.db.utils.OperationalError: no such table: django_extensions_permmodel /usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py:328: OperationalError _____________________ DumpScriptTests.test_replaced_stdout _____________________ self = <django.db.backends.utils.CursorWrapper object at 0x7f7aeb31add0> sql = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () ignored_wrapper_args = (False, {'connection': <DatabaseWrapper vendor='sqlite' alias='default'>, 'cursor': <django.db.backends.utils.CursorWrapper object at 0x7f7aeb31add0>}) def _execute(self, sql, params, *ignored_wrapper_args): self.db.validate_no_broken_transaction() with self.db.wrap_database_errors: if params is None: # params default might be backend specific. return self.cursor.execute(sql) else: > return self.cursor.execute(sql, params) /usr/lib/python3/dist-packages/django/db/backends/utils.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <django.db.backends.sqlite3.base.SQLiteCursorWrapper object at 0x7f7aeb710200> query = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () def execute(self, query, params=None): if params is None: return super().execute(query) # Extract names if params is a mapping, i.e. "pyformat" style is used. param_names = list(params) if isinstance(params, Mapping) else None query = self.convert_query(query, param_names=param_names) > return super().execute(query, params) E sqlite3.OperationalError: no such table: django_extensions_permmodel /usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py:328: OperationalError The above exception was the direct cause of the following exception: self = <tests.test_dumpscript.DumpScriptTests testMethod=test_replaced_stdout> def test_replaced_stdout(self): # check if stdout can be replaced sys.stdout = StringIO() n = Name(name='Mike') n.save() tmp_out = StringIO() > call_command('dumpscript', 'django_extensions', stdout=tmp_out) tests/test_dumpscript.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/django/core/management/__init__.py:194: in call_command return command.execute(*args, **defaults) /usr/lib/python3/dist-packages/django/core/management/base.py:458: in execute output = self.handle(*args, **options) django_extensions/management/utils.py:62: in inner ret = func(self, *args, **kwargs) django_extensions/management/commands/dumpscript.py:118: in handle self.stdout.write(str(script)) django_extensions/management/commands/dumpscript.py:181: in __str__ return flatten_blocks(self.lines, num_indents=self.indent) django_extensions/management/commands/dumpscript.py:475: in get_lines code.append(model_class.lines) django_extensions/management/commands/dumpscript.py:219: in get_lines for counter, item in enumerate(self.model._default_manager.all()): /usr/lib/python3/dist-packages/django/db/models/query.py:398: in __iter__ self._fetch_all() /usr/lib/python3/dist-packages/django/db/models/query.py:1881: in _fetch_all self._result_cache = list(self._iterable_class(self)) /usr/lib/python3/dist-packages/django/db/models/query.py:91: in __iter__ results = compiler.execute_sql( /usr/lib/python3/dist-packages/django/db/models/sql/compiler.py:1562: in execute_sql cursor.execute(sql, params) /usr/lib/python3/dist-packages/django/db/backends/utils.py:67: in execute return self._execute_with_wrappers( /usr/lib/python3/dist-packages/django/db/backends/utils.py:80: in _execute_with_wrappers return executor(sql, params, many, context) /usr/lib/python3/dist-packages/django/db/backends/utils.py:84: in _execute with self.db.wrap_database_errors: /usr/lib/python3/dist-packages/django/db/utils.py:91: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/lib/python3/dist-packages/django/db/backends/utils.py:89: in _execute return self.cursor.execute(sql, params) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <django.db.backends.sqlite3.base.SQLiteCursorWrapper object at 0x7f7aeb710200> query = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () def execute(self, query, params=None): if params is None: return super().execute(query) # Extract names if params is a mapping, i.e. "pyformat" style is used. param_names = list(params) if isinstance(params, Mapping) else None query = self.convert_query(query, param_names=param_names) > return super().execute(query, params) E django.db.utils.OperationalError: no such table: django_extensions_permmodel /usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py:328: OperationalError __________________________ DumpScriptTests.test_runs ___________________________ self = <django.db.backends.utils.CursorWrapper object at 0x7f7aeb6aad50> sql = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () ignored_wrapper_args = (False, {'connection': <DatabaseWrapper vendor='sqlite' alias='default'>, 'cursor': <django.db.backends.utils.CursorWrapper object at 0x7f7aeb6aad50>}) def _execute(self, sql, params, *ignored_wrapper_args): self.db.validate_no_broken_transaction() with self.db.wrap_database_errors: if params is None: # params default might be backend specific. return self.cursor.execute(sql) else: > return self.cursor.execute(sql, params) /usr/lib/python3/dist-packages/django/db/backends/utils.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <django.db.backends.sqlite3.base.SQLiteCursorWrapper object at 0x7f7aea8cbb60> query = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () def execute(self, query, params=None): if params is None: return super().execute(query) # Extract names if params is a mapping, i.e. "pyformat" style is used. param_names = list(params) if isinstance(params, Mapping) else None query = self.convert_query(query, param_names=param_names) > return super().execute(query, params) E sqlite3.OperationalError: no such table: django_extensions_permmodel /usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py:328: OperationalError The above exception was the direct cause of the following exception: self = <tests.test_dumpscript.DumpScriptTests testMethod=test_runs> def test_runs(self): # lame test...does it run? n = Name(name='Gabriel') n.save() > call_command('dumpscript', 'django_extensions') tests/test_dumpscript.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/django/core/management/__init__.py:194: in call_command return command.execute(*args, **defaults) /usr/lib/python3/dist-packages/django/core/management/base.py:458: in execute output = self.handle(*args, **options) django_extensions/management/utils.py:62: in inner ret = func(self, *args, **kwargs) django_extensions/management/commands/dumpscript.py:118: in handle self.stdout.write(str(script)) django_extensions/management/commands/dumpscript.py:181: in __str__ return flatten_blocks(self.lines, num_indents=self.indent) django_extensions/management/commands/dumpscript.py:475: in get_lines code.append(model_class.lines) django_extensions/management/commands/dumpscript.py:219: in get_lines for counter, item in enumerate(self.model._default_manager.all()): /usr/lib/python3/dist-packages/django/db/models/query.py:398: in __iter__ self._fetch_all() /usr/lib/python3/dist-packages/django/db/models/query.py:1881: in _fetch_all self._result_cache = list(self._iterable_class(self)) /usr/lib/python3/dist-packages/django/db/models/query.py:91: in __iter__ results = compiler.execute_sql( /usr/lib/python3/dist-packages/django/db/models/sql/compiler.py:1562: in execute_sql cursor.execute(sql, params) /usr/lib/python3/dist-packages/django/db/backends/utils.py:67: in execute return self._execute_with_wrappers( /usr/lib/python3/dist-packages/django/db/backends/utils.py:80: in _execute_with_wrappers return executor(sql, params, many, context) /usr/lib/python3/dist-packages/django/db/backends/utils.py:84: in _execute with self.db.wrap_database_errors: /usr/lib/python3/dist-packages/django/db/utils.py:91: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/lib/python3/dist-packages/django/db/backends/utils.py:89: in _execute return self.cursor.execute(sql, params) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <django.db.backends.sqlite3.base.SQLiteCursorWrapper object at 0x7f7aea8cbb60> query = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () def execute(self, query, params=None): if params is None: return super().execute(query) # Extract names if params is a mapping, i.e. "pyformat" style is used. param_names = list(params) if isinstance(params, Mapping) else None query = self.convert_query(query, param_names=param_names) > return super().execute(query, params) E django.db.utils.OperationalError: no such table: django_extensions_permmodel /usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py:328: OperationalError ______________________ DumpScriptTests.test_valid_syntax _______________________ self = <django.db.backends.utils.CursorWrapper object at 0x7f7ae9f0ce90> sql = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () ignored_wrapper_args = (False, {'connection': <DatabaseWrapper vendor='sqlite' alias='default'>, 'cursor': <django.db.backends.utils.CursorWrapper object at 0x7f7ae9f0ce90>}) def _execute(self, sql, params, *ignored_wrapper_args): self.db.validate_no_broken_transaction() with self.db.wrap_database_errors: if params is None: # params default might be backend specific. return self.cursor.execute(sql) else: > return self.cursor.execute(sql, params) /usr/lib/python3/dist-packages/django/db/backends/utils.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <django.db.backends.sqlite3.base.SQLiteCursorWrapper object at 0x7f7aeb712690> query = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () def execute(self, query, params=None): if params is None: return super().execute(query) # Extract names if params is a mapping, i.e. "pyformat" style is used. param_names = list(params) if isinstance(params, Mapping) else None query = self.convert_query(query, param_names=param_names) > return super().execute(query, params) E sqlite3.OperationalError: no such table: django_extensions_permmodel /usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py:328: OperationalError The above exception was the direct cause of the following exception: self = <tests.test_dumpscript.DumpScriptTests testMethod=test_valid_syntax> def test_valid_syntax(self): n1 = Name(name='John') n1.save() p1 = Person(name=n1, age=40) p1.save() n2 = Name(name='Jane') n2.save() p2 = Person(name=n2, age=18) p2.save() p2.children.add(p1) note1 = Note(note="This is the first note.") note1.save() note2 = Note(note="This is the second note.") note2.save() p2.notes.add(note1, note2) tmp_out = StringIO() > call_command('dumpscript', 'django_extensions', stdout=tmp_out) tests/test_dumpscript.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/django/core/management/__init__.py:194: in call_command return command.execute(*args, **defaults) /usr/lib/python3/dist-packages/django/core/management/base.py:458: in execute output = self.handle(*args, **options) django_extensions/management/utils.py:62: in inner ret = func(self, *args, **kwargs) django_extensions/management/commands/dumpscript.py:118: in handle self.stdout.write(str(script)) django_extensions/management/commands/dumpscript.py:181: in __str__ return flatten_blocks(self.lines, num_indents=self.indent) django_extensions/management/commands/dumpscript.py:475: in get_lines code.append(model_class.lines) django_extensions/management/commands/dumpscript.py:219: in get_lines for counter, item in enumerate(self.model._default_manager.all()): /usr/lib/python3/dist-packages/django/db/models/query.py:398: in __iter__ self._fetch_all() /usr/lib/python3/dist-packages/django/db/models/query.py:1881: in _fetch_all self._result_cache = list(self._iterable_class(self)) /usr/lib/python3/dist-packages/django/db/models/query.py:91: in __iter__ results = compiler.execute_sql( /usr/lib/python3/dist-packages/django/db/models/sql/compiler.py:1562: in execute_sql cursor.execute(sql, params) /usr/lib/python3/dist-packages/django/db/backends/utils.py:67: in execute return self._execute_with_wrappers( /usr/lib/python3/dist-packages/django/db/backends/utils.py:80: in _execute_with_wrappers return executor(sql, params, many, context) /usr/lib/python3/dist-packages/django/db/backends/utils.py:84: in _execute with self.db.wrap_database_errors: /usr/lib/python3/dist-packages/django/db/utils.py:91: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/lib/python3/dist-packages/django/db/backends/utils.py:89: in _execute return self.cursor.execute(sql, params) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <django.db.backends.sqlite3.base.SQLiteCursorWrapper object at 0x7f7aeb712690> query = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () def execute(self, query, params=None): if params is None: return super().execute(query) # Extract names if params is a mapping, i.e. "pyformat" style is used. param_names = list(params) if isinstance(params, Mapping) else None query = self.convert_query(query, param_names=param_names) > return super().execute(query, params) E django.db.utils.OperationalError: no such table: django_extensions_permmodel /usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py:328: OperationalError ___________________ DumpScriptTests.test_with_datetimefield ____________________ self = <django.db.backends.utils.CursorWrapper object at 0x7f7aea6e9810> sql = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () ignored_wrapper_args = (False, {'connection': <DatabaseWrapper vendor='sqlite' alias='default'>, 'cursor': <django.db.backends.utils.CursorWrapper object at 0x7f7aea6e9810>}) def _execute(self, sql, params, *ignored_wrapper_args): self.db.validate_no_broken_transaction() with self.db.wrap_database_errors: if params is None: # params default might be backend specific. return self.cursor.execute(sql) else: > return self.cursor.execute(sql, params) /usr/lib/python3/dist-packages/django/db/backends/utils.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <django.db.backends.sqlite3.base.SQLiteCursorWrapper object at 0x7f7aeb5b16d0> query = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () def execute(self, query, params=None): if params is None: return super().execute(query) # Extract names if params is a mapping, i.e. "pyformat" style is used. param_names = list(params) if isinstance(params, Mapping) else None query = self.convert_query(query, param_names=param_names) > return super().execute(query, params) E sqlite3.OperationalError: no such table: django_extensions_permmodel /usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py:328: OperationalError The above exception was the direct cause of the following exception: self = <tests.test_dumpscript.DumpScriptTests testMethod=test_with_datetimefield> @override_settings(TIME_ZONE='Asia/Seoul') def test_with_datetimefield(self): django = Club.objects.create(name='Club Django') Note.objects.create( note='Django Tips', club=django, ) dumpscript_path = './django_extensions/scripts' os.mkdir(dumpscript_path) open(dumpscript_path + '/__init__.py', 'w').close() # for python 2.7 # This script will have a dateutil codes. # e.g. importer.locate_object(..., # 'date_joined': dateutil.parser.parse("2019-05-20T03:32:27.144586+09:00") with open(dumpscript_path + '/test.py', 'wt') as test: > call_command('dumpscript', 'django_extensions', stdout=test) tests/test_dumpscript.py:90: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/django/core/management/__init__.py:194: in call_command return command.execute(*args, **defaults) /usr/lib/python3/dist-packages/django/core/management/base.py:458: in execute output = self.handle(*args, **options) django_extensions/management/utils.py:62: in inner ret = func(self, *args, **kwargs) django_extensions/management/commands/dumpscript.py:118: in handle self.stdout.write(str(script)) django_extensions/management/commands/dumpscript.py:181: in __str__ return flatten_blocks(self.lines, num_indents=self.indent) django_extensions/management/commands/dumpscript.py:475: in get_lines code.append(model_class.lines) django_extensions/management/commands/dumpscript.py:219: in get_lines for counter, item in enumerate(self.model._default_manager.all()): /usr/lib/python3/dist-packages/django/db/models/query.py:398: in __iter__ self._fetch_all() /usr/lib/python3/dist-packages/django/db/models/query.py:1881: in _fetch_all self._result_cache = list(self._iterable_class(self)) /usr/lib/python3/dist-packages/django/db/models/query.py:91: in __iter__ results = compiler.execute_sql( /usr/lib/python3/dist-packages/django/db/models/sql/compiler.py:1562: in execute_sql cursor.execute(sql, params) /usr/lib/python3/dist-packages/django/db/backends/utils.py:67: in execute return self._execute_with_wrappers( /usr/lib/python3/dist-packages/django/db/backends/utils.py:80: in _execute_with_wrappers return executor(sql, params, many, context) /usr/lib/python3/dist-packages/django/db/backends/utils.py:84: in _execute with self.db.wrap_database_errors: /usr/lib/python3/dist-packages/django/db/utils.py:91: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value /usr/lib/python3/dist-packages/django/db/backends/utils.py:89: in _execute return self.cursor.execute(sql, params) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <django.db.backends.sqlite3.base.SQLiteCursorWrapper object at 0x7f7aeb5b16d0> query = 'SELECT "django_extensions_permmodel"."id" FROM "django_extensions_permmodel"' params = () def execute(self, query, params=None): if params is None: return super().execute(query) # Extract names if params is a mapping, i.e. "pyformat" style is used. param_names = list(params) if isinstance(params, Mapping) else None query = self.convert_query(query, param_names=param_names) > return super().execute(query, params) E django.db.utils.OperationalError: no such table: django_extensions_permmodel /usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py:328: OperationalError =============================== warnings summary =============================== ../../../../../../usr/lib/python3/dist-packages/django/conf/__init__.py:241 /usr/lib/python3/dist-packages/django/conf/__init__.py:241: RemovedInDjango50Warning: The default value of USE_TZ will change from False to True in Django 5.0. Set USE_TZ to False in your project settings if you want to keep the current default behavior. warnings.warn( ../../../../../../usr/lib/python3/dist-packages/django/db/models/options.py:210 tests/auth/test_mixins.py::ModelUserFieldPermissionMixinTests::test_permission_denied_and_redirect /usr/lib/python3/dist-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'testapp.SqlDiff' instead. warnings.warn( ../../../../../../usr/lib/python3/dist-packages/_distutils_hack/__init__.py:33 /usr/lib/python3/dist-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") django_extensions/management/commands/pipchecker.py:18 django_extensions/management/commands/pipchecker.py:18 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-extensions/build/django_extensions/management/commands/pipchecker.py:18: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(pip.__version__) >= LooseVersion('19.0'): tests/management/commands/shell_plus_tests/test_import_subclasses.py::ImportSubclassesTestCase::test_imports_one_base_class /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-extensions/build/tests/management/commands/test_pipchecker.py:8: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources tests/management/commands/test_delete_squashed_migrations.py::DeleteSquashedMigrationsExceptionsTests::test_should_raise_CommandEror_if_more_than_one_migration_matches_to_given_arg tests/management/commands/test_delete_squashed_migrations.py::DeleteSquashedMigrationsExceptionsTests::test_should_raise_CommandEror_if_squashed_migration_not_found tests/management/commands/test_delete_squashed_migrations.py::DeleteSquashedMigrationsExceptionsTests::test_should_raise_CommandEror_if_squashed_migration_not_foundee tests/management/commands/test_delete_squashed_migrations.py::DeleteSquashedMigrationsExceptionsTests::test_should_raise_CommandError_if_app_does_not_have_migrations tests/management/commands/test_delete_squashed_migrations.py::DeleteSquashedMigrationsExceptionsTests::test_should_raise_CommandError_when_database_does_not_exist tests/management/commands/test_delete_squashed_migrations.py::DeleteSquashedMigrationsTests::test_should_delete_squashed_migrations tests/management/commands/test_delete_squashed_migrations.py::DeleteSquashedMigrationsTests::test_should_delete_squashed_migrations_if_interactive_mode_is_set_to_False tests/management/commands/test_delete_squashed_migrations.py::DeleteSquashedMigrationsTests::test_should_not_delete_anything tests/management/commands/test_delete_squashed_migrations.py::DeleteSquashedMigrationsTests::test_should_not_delete_files_for_given_squashed_migration /usr/lib/python3/dist-packages/django/db/models/base.py:366: RuntimeWarning: Model 'testapp_with_appconfig.titlemodel' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) tests/management/commands/test_delete_squashed_migrations.py::DeleteSquashedMigrationsExceptionsTests::test_should_raise_CommandEror_if_squashed_migration_not_found tests/management/commands/test_delete_squashed_migrations.py::DeleteSquashedMigrationsTests::test_should_delete_squashed_migrations_if_interactive_mode_is_set_to_False tests/management/commands/test_delete_squashed_migrations.py::DeleteSquashedMigrationsTests::test_should_not_delete_files_for_given_squashed_migration /usr/lib/python3/dist-packages/django/db/models/base.py:366: RuntimeWarning: Model 'testapp_with_appconfig.namemodel' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) tests/management/commands/test_describe_form.py::DescribeFormTests::test_should_print_form_definition_for_TestModel_with_non_editable_field tests/management/commands/test_describe_form.py::DescribeFormTests::test_should_print_form_with_fields_for_TestModel /usr/lib/python3/dist-packages/django/db/models/base.py:366: RuntimeWarning: Model 'testapp.basemodel' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) tests/management/commands/test_describe_form.py::DescribeFormTests::test_should_print_form_definition_for_TestModel_with_non_editable_field tests/management/commands/test_describe_form.py::DescribeFormTests::test_should_print_form_with_fields_for_TestModel /usr/lib/python3/dist-packages/django/db/models/base.py:366: RuntimeWarning: Model 'testapp.noneditablemodel' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) tests/management/commands/test_drop_test_database.py: 11 warnings tests/management/commands/test_reset_db.py: 3 warnings tests/management/commands/test_reset_schema.py: 1 warning tests/management/commands/test_sqlcreate.py: 6 warnings tests/management/commands/test_sqldsn.py: 13 warnings /usr/lib/python3/dist-packages/django/test/utils.py:458: UserWarning: Overriding setting DATABASES can lead to unexpected behavior. with self as context: tests/management/commands/test_reset_db.py::ResetDbSqlite3Tests::test_should_cancel_reset_db_if_input_is_different_than_yes tests/management/commands/test_reset_db.py::ResetDbMysqlTests::test_should_cancel_reset_db_if_input_is_different_than_yes tests/management/commands/test_reset_db.py::ResetDbPostgresqlTests::test_should_cancel_reset_db_if_input_is_different_than_yes tests/management/commands/test_reset_schema.py::ResetSchemaTests::test_should_cancel_reset_schema_and_print_info_if_input_is_different_than_yes /usr/lib/python3/dist-packages/django/test/testcases.py:1448: UserWarning: Overriding setting DATABASES can lead to unexpected behavior. super().setUpClass() tests/management/commands/test_update_permissions.py::UpdatePermissionsTests::test_should_reload_permission_only_for_specified_apps tests/management/commands/test_update_permissions.py::UpdatePermissionsTests::test_should_update_permission_if_name_changed tests/management/commands/test_update_permissions.py::UpdatePermissionsTests::test_works /usr/lib/python3/dist-packages/django/db/models/base.py:366: RuntimeWarning: Model 'django_extensions.permmodel' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) tests/management/commands/test_update_permissions.py::UpdatePermissionsTests::test_should_reload_permission_only_for_specified_apps tests/management/commands/test_update_permissions.py::UpdatePermissionsTests::test_should_update_permission_if_name_changed tests/management/commands/test_update_permissions.py::UpdatePermissionsTests::test_works /usr/lib/python3/dist-packages/django/db/models/base.py:366: RuntimeWarning: Model 'testapp.testmodel' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) tests/management/commands/test_generate_password.py::test_without_args /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-extensions/build/django_extensions/management/commands/generate_password.py:30: RemovedInDjango51Warning: BaseUserManager.make_random_password() is deprecated. return manager.make_random_password() tests/management/commands/test_generate_password.py::test_with_length_args /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-extensions/build/django_extensions/management/commands/generate_password.py:28: RemovedInDjango51Warning: BaseUserManager.make_random_password() is deprecated. return manager.make_random_password(length) tests/management/commands/test_print_settings.py::test_without_args tests/management/commands/test_print_settings.py::test_with_setting_args tests/management/commands/test_print_settings.py::test_with_setting_wildcard tests/management/commands/test_print_settings.py::test_with_setting_fail tests/management/commands/test_print_settings.py::test_with_multiple_setting_args tests/management/commands/test_print_settings.py::test_format tests/management/commands/test_print_settings.py::test_format_json_without_indent /usr/lib/python3/dist-packages/django/conf/__init__.py:193: RemovedInDjango51Warning: The DEFAULT_FILE_STORAGE setting is deprecated. Use STORAGES instead. self._show_deprecation_warning( tests/management/commands/test_print_settings.py::test_without_args tests/management/commands/test_print_settings.py::test_with_setting_args tests/management/commands/test_print_settings.py::test_with_setting_wildcard tests/management/commands/test_print_settings.py::test_with_setting_fail tests/management/commands/test_print_settings.py::test_with_multiple_setting_args tests/management/commands/test_print_settings.py::test_format tests/management/commands/test_print_settings.py::test_format_json_without_indent /usr/lib/python3/dist-packages/django/conf/__init__.py:201: RemovedInDjango51Warning: The STATICFILES_STORAGE setting is deprecated. Use STORAGES instead. self._show_deprecation_warning( tests/management/commands/test_print_settings.py::test_without_args tests/management/commands/test_print_settings.py::test_with_setting_args tests/management/commands/test_print_settings.py::test_with_setting_wildcard tests/management/commands/test_print_settings.py::test_with_setting_fail tests/management/commands/test_print_settings.py::test_with_multiple_setting_args tests/management/commands/test_print_settings.py::test_format tests/management/commands/test_print_settings.py::test_format_json_without_indent /usr/lib/python3/dist-packages/django/conf/__init__.py:178: RemovedInDjango50Warning: The USE_L10N setting is deprecated. Starting with Django 5.0, localized formatting of data will always be enabled. For example Django will display numbers and dates using the format of the current locale. self._show_deprecation_warning( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/test_dumpscript.py::DumpScriptTests::test_replaced_stderr - djan... FAILED tests/test_dumpscript.py::DumpScriptTests::test_replaced_stdout - djan... FAILED tests/test_dumpscript.py::DumpScriptTests::test_runs - django.db.utils... FAILED tests/test_dumpscript.py::DumpScriptTests::test_valid_syntax - django.... FAILED tests/test_dumpscript.py::DumpScriptTests::test_with_datetimefield - d... = 5 failed, 504 passed, 4 skipped, 4 xfailed, 6 xpassed, 90 warnings in 8.00s == E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_django-extensions/build; python3.11 -m pytest --no-cov --ignore=tests/management/commands/test_pipchecker.py django_extensions tests
The text was updated successfully, but these errors were encountered:
No branches or pull requests
IDK whether it's due to the recent pytest release or django, but since recently, tests in
tests/test_dumpscript.py
all fail.The text was updated successfully, but these errors were encountered: