Code factorization on EmType select and unselect fields. Added comparison capabilities to EmComponent (and childs)
Implemented __hash__ and __eq__ for EmComponent (based on class name and uid) to test equality betwenn two instance. Allows to use "instance in instance_list" syntax
Code factorization and create methods for EmComponent and childs changes
Behaviour changed for EmComponent and childs create method :
- Takes care of duplicated names at creation
- Handle all the checks in EmComponent method
Factorization of EmField.get_class_table() method
Added a @property method class_table_name to EmClass
Added docstrings comments to tests and fixed "false hidden failure"
Added docstrings comments to tests (for fancy output with -v ).
Fixed strange hidden failure that make tests stops on non failed tests with -f option. Those false failure seems to comes from with self.subTest blocs with functions calls that does assertion.
New way to specify _fields and table in EmComponent's child classes
Now _fields and table MUST be class attribute.
Its important to note that _fields now consist in a list of (name, ftype) tuples and that ftype is a EmFieldType class and NOT an EmFieldType instance
Cleaning code for EmComponent
Optimizing tests for EmComponent and EmFieldGroup (running initDb in setUpModule and make a backup copy, the backup is restored in setUp)
EmComponent.create() now takes keywords arguments corresponding to the _fields property of the calling class
WARNING !!! Hardcoded rank = -1 at component creation and Hardcoded 0 as default value for EmClass icon