Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#7825 closed (fixed)

modeltests/delete test fails after NFA merge

Reported by: jacob Owned by: lukeplant
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: UI/UX:

Description

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/_doctest.py", 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/models.py", line unknown line number, in API_TESTS

----------------------------------------------------------------------
File "/Users/jacob/Projects/Django/upstream/tests/modeltests/delete/models.py", 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/_doctest.py", 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 7 years ago by brosner

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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

comment:2 Changed 7 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 7 years ago by lukeplant

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:4 Changed 4 years ago by jacob

  • milestone 1.0 alpha deleted

Milestone 1.0 alpha deleted

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