#22816 closed Bug (fixed)
Oracle test failure: Inspecting NullBooleanField
Reported by: | Shai Berger | Owned by: | Shai Berger |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.7-beta-2 |
Severity: | Release blocker | Keywords: | oracle |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
====================================================================== FAIL: test_number_field_types (inspectdb.tests.InspectDBTestCase) Test introspection of various Django field types ---------------------------------------------------------------------- Traceback (most recent call last): File "<.../tests/inspectdb/tests.py",> line 95, in test_number_field_types assertFieldType('null_bool_field', "models.BooleanField()") File "<.../tests/inspectdb/tests.py",> line 38, in assertFieldType self.assertEqual(definition, out_def) AssertionError: u'models.BooleanField()' != 'models.NullBooleanField()' ---------------------------------------------------------------------- Ran 7008 tests in 11909.588s FAILED (failures=1, skipped=333, expected failures=8)
The copied report was on master, but 1.7 has it too.
It's probably some minor thing, I'll deal with it later today.
Change History (4)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
@aaugustin and @manfre have confirmed that the flag is needed by django-pymssql, a 3rd-party backend. So, I'm just fixing the Oracle issue.
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
This was introduced by a03d38ddd43957a402b64caddf74a73df72140fb and 5c95a55330bc2531405700a399bfb555bfe80120 on master (342b25449d800ce29ae56ff8285869cbc3133a75 and 1238f92c649ccd4ba99da0ce70be7597c90515d4 on stable/1.7.x). The first commit in each pair introduces a
can_introspect_null
database-feature, and sets it to False for Oracle; the latter uses the flag in tests for integer and boolean fields.Oracle has issues introspecting nullability in character fields, because it
interprets_empty_strings_as_nulls
(so the backend defines all character fields as nullable in order to allow empty strings); but it has no such issues with integer fields or boolean fields.Unless the
can_introspect_null
flag serves some 3rd-party backend, I suggest that we simply revert these four commits.