Ticket #20 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Column re-definition with kargs inconsistent in autoload scenario

Reported by: guest Owned by:
Priority: minor Milestone:
Component: core Version: 0.4.0
Keywords: Cc: jaraco@…

Description

Since r221, it's been disallowed to override columns in autoloaded tables. However, it appears that in the case where a keyword argument is passed to the field definition, the duplicity is not checked, and the expected exception is not thrown.

Originally, I thought it was the key="attribute_name" parameter that was avoiding the exception, but it also appears even primary_key=True will avoid the exception.

A complete example written as a unit test is included with this ticket. In this example, the Person class initializes correctly (when it shouldn't), but the Animal class throws the expected exception.

Attachments

test_autoload_override_column.py (1.7 kB) - added by guest 6 years ago.
Unit test, modeled after test_autoload.py, demonstrating issue

Change History

Changed 6 years ago by guest

Unit test, modeled after test_autoload.py, demonstrating issue

Changed 6 years ago by guest

  • cc jaraco@… added

Changed 6 years ago by ged

  • status changed from new to closed
  • resolution set to fixed

fixed in r268

Note: See TracTickets for help on using tickets.