Opened 10 years ago

Closed 10 years ago

#23477 closed Uncategorized (invalid)

test failures run from 1.7; test_serialize, test_simple_migration

Reported by: Ian Delaney Owned by: nobody
Component: Testing framework Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

There's another issue opened a week ago re test_serialize however the commit/patch that declares the fix doesn't take.

======================================================================
ERROR: test_serialize (migrations.test_writer.WriterTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/gen2/TmpDir/portage/dev-python/django-1.7/work/Django-1.7/tests/migrations/test_writer.py", line 93, in test_serialize
    self.assertSerializedEqual(datetime.datetime.utcnow)
  File "/mnt/gen2/TmpDir/portage/dev-python/django-1.7/work/Django-1.7/tests/migrations/test_writer.py", line 52, in assertSerializedEqual
    self.assertEqual(self.serialize_round_trip(value), value)
  File "/mnt/gen2/TmpDir/portage/dev-python/django-1.7/work/Django-1.7/tests/migrations/test_writer.py", line 48, in serialize_round_trip
    string, imports = MigrationWriter.serialize(value)
  File "/mnt/gen2/TmpDir/portage/dev-python/django-1.7/work/Django-1.7/django/db/migrations/writer.py", line 380, in serialize
    raise ValueError("Cannot serialize: %r\nThere are some values Django cannot serialize into migration files.\nFor more, see https://docs.djangoproject.com/en/dev/topics/migrations/#migration-serializing" % value)
ValueError: Cannot serialize: <bound method type.utcnow of <class 'datetime.datetime'>>
There are some values Django cannot serialize into migration files.
For more, see https://docs.djangoproject.com/en/dev/topics/migrations/#migration-serializing

======================================================================
ERROR: test_simple_migration (migrations.test_writer.WriterTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/gen2/TmpDir/portage/dev-python/django-1.7/work/Django-1.7/tests/migrations/test_writer.py", line 244, in test_simple_migration
    output = writer.as_string()
  File "/mnt/gen2/TmpDir/portage/dev-python/django-1.7/work/Django-1.7/django/db/migrations/writer.py", line 129, in as_string
    operation_string, operation_imports = OperationWriter(operation).serialize()
  File "/mnt/gen2/TmpDir/portage/dev-python/django-1.7/work/Django-1.7/django/db/migrations/writer.py", line 80, in serialize
    arg_string, arg_imports = MigrationWriter.serialize(item)
  File "/mnt/gen2/TmpDir/portage/dev-python/django-1.7/work/Django-1.7/django/db/migrations/writer.py", line 245, in serialize
    item_string, item_imports = cls.serialize(item)
  File "/mnt/gen2/TmpDir/portage/dev-python/django-1.7/work/Django-1.7/django/db/migrations/writer.py", line 310, in serialize
    return cls.serialize_deconstructed(path, args, kwargs)
  File "/mnt/gen2/TmpDir/portage/dev-python/django-1.7/work/Django-1.7/django/db/migrations/writer.py", line 221, in serialize_deconstructed
    arg_string, arg_imports = cls.serialize(arg)
  File "/mnt/gen2/TmpDir/portage/dev-python/django-1.7/work/Django-1.7/django/db/migrations/writer.py", line 380, in serialize
    raise ValueError("Cannot serialize: %r\nThere are some values Django cannot serialize into migration files.\nFor more, see https://docs.djangoproject.com/en/dev/topics/migrations/#migration-serializing" % value)
ValueError: Cannot serialize: <bound method type.utcnow of <class 'datetime.datetime'>>
There are some values Django cannot serialize into migration files.
For more, see https://docs.djangoproject.com/en/dev/topics/migrations/#migration-serializing

----------------------------------------------------------------------
Ran 7215 tests in 956.466s

FAILED (errors=2, skipped=534, expected failures=8)

under all pythons. I expect you'll tell me it passes fine.

Change History (4)

comment:1 by Tim Graham, 10 years ago

I haven't seen failures like this. Can you try to debug the failures yourself or at least provide more details about your OS, etc? It seems like the isinstance(value, datetime.datetime) check in django.db.migrations.writer isn't working for some reason.

comment:2 by Ian Delaney, 10 years ago

archtester django # PYTHON_TARGETS=python2_7 ebuild django-1.7.ebuild clean test

Ran 7220 tests in 415.594s

OK (skipped=591, expected failures=8)
Testing against Django installed in '/mnt/gen2/tmpdir/portage/dev-python/django-1.7/work/Django-1.7/django'
Creating test database for alias 'default'...
Creating test database for alias 'other'...
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...

when run in a brand new gentoo system. Appears to be a false alarm. Forget it

comment:3 by Ian Delaney, 10 years ago

archtester django # PYTHON_TARGETS=python2_7 ebuild django-1.7.ebuild clean test

Ran 7220 tests in 415.594s

OK (skipped=591, expected failures=8)
Testing against Django installed in '/mnt/gen2/tmpdir/portage/dev-python/django-1.7/work/Django-1.7/django'
Creating test database for alias 'default'...
Creating test database for alias 'other'...
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...

when run in a brand new gentoo system. Appears to be a false alarm. Forget it

comment:4 by Simon Charette, 10 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top