Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#11049 closed (fixed)

Oracle fails to return IntegerField in test_get_table_description_types

Reported by: Matt Boersma Owned by: Matt Boersma
Component: Database layer (models, ORM) Version: dev
Severity: Keywords: Oracle oracle
Cc: Erin Kelly Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The Oracle backend raises an AssertionError when executing test_get_table_description_types in the test suite:

C:\projects\django-1.0.x\tests>runtests.py --settings=testsettings.oracle introspection
...

======================================================================
FAIL: test_get_table_description_types (regressiontests.introspection.tests.IntrospectionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\django-1.0.x\tests\regressiontests\introspection\tests.py", line 28, in _inner
    return func(*args, **kwargs)
  File "C:\projects\django-1.0.x\tests\regressiontests\introspection\tests.py", line 80, in test_get_table_description_types
    ['IntegerField', 'CharField', 'CharField', 'CharField'])
AssertionError: ['DecimalField', 'CharField', 'CharField', 'CharField'] != ['IntegerField', 'CharField', 'CharField', 'CharField']

Oracle doesn't have a distinct data type for integers as opposed to floating point numbers; they all come across as cx_Oracle.NUMERIC. Either we should use a different approach during introspection, or this test case should be changed so this isn't considered an error when run against Oracle.

This happens in both the 1.0.x maintenance branch and the pre-1.1 trunk as of revision [10723]. It hasn't caused real-world problems as far as I know, but I've entered it here as a bug so we don't lose track of it.

Attachments (1)

11049_fix.diff (4.9 KB ) - added by Matt Boersma 16 years ago.
A fix to allow Oracle to properly introspect IntegerFields, created against trunk [10748]

Download all attachments as: .zip

Change History (4)

by Matt Boersma, 16 years ago

Attachment: 11049_fix.diff added

A fix to allow Oracle to properly introspect IntegerFields, created against trunk [10748]

comment:1 by Matt Boersma, 16 years ago

Has patch: set
Needs tests: set
Owner: changed from nobody to Matt Boersma
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 by Matt Boersma, 15 years ago

Resolution: fixed
Status: assignedclosed

(In [11475]) Fixed #11049: introspection on Oracle now identifies IntegerFields correctly.

comment:3 by Matt Boersma, 15 years ago

(In [11476]) [1.0.X] Fixed #11049: introspection on Oracle now identifies IntegerFields correctly.

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