Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#7825 closed (fixed)

modeltests/delete test fails after NFA merge

Reported by: Jacob Owned by: Luke Plant
Component: Metasystem Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


After the NFA merge, this happens:

FAIL: Doctest: modeltests.delete.models.__test__.API_TESTS
Traceback (most recent call last):
  File "/Users/jacob/Projects/Django/upstream/django/test/", line 2180, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for modeltests.delete.models.__test__.API_TESTS
  File "/Users/jacob/Projects/Django/upstream/tests/modeltests/delete/", line unknown line number, in API_TESTS

File "/Users/jacob/Projects/Django/upstream/tests/modeltests/delete/", line ?, in modeltests.delete.models.__test__.API_TESTS
Failed example:
    del D._meta._related_objects_cache
Exception raised:
    Traceback (most recent call last):
      File "/Users/jacob/Projects/Django/upstream/django/test/", line 1267, in __run
        compileflags, 1) in test.globs
      File "<doctest modeltests.delete.models.__test__.API_TESTS[17]>", line 1, in <module>
        del D._meta._related_objects_cache
    AttributeError: _related_objects_cache

Ran 1 test in 0.046s

FAILED (failures=1)

It appears to be related to the somewhat fishy internals hacking in the test case. The failure may be related to the change in import behavior because of admin registry class.

Change History (4)

comment:1 Changed 10 years ago by Brian Rosner

This started to appear prior to the merge on the newforms-admin branch once I committed [7929].

comment:2 Changed 10 years ago by anonymous

[8:13pm] jbronn: regarding #7825, when I merge up to latest trunk the delte test pass; so I examined the differences between the two branches.
[8:14pm] jbronn: besides the stuff that was supposed to be different, I found some vestiges that I need to remove -- one of those was the 'NoField' stuff used by the ManyToMany field. when I remove those references the test fails like in trunk

comment:3 Changed 10 years ago by Luke Plant

Resolution: fixed
Status: newclosed

(In [8030]) Fixed #7825 - modeltests/delete tests failing after NFA merge, and improved documentation of these tests.

comment:4 Changed 7 years ago by Jacob

milestone: 1.0 alpha

Milestone 1.0 alpha deleted

Note: See TracTickets for help on using tickets.
Back to Top