fromtg_option_containerimportOption,OptionContainerclassCharacter(OptionContainer):props=[Option.string('name',None),Option.string('gender',None,choices=('M','N')),]john=Character(name='John Smith',gender='M')# This will raise: tg_option_container.types.InvalidOption: Invalid choice x for option `gender`, choices are ('M', 'N').mary=Character(name='Mary Smith',gender='x')
Development
You can run the tests by running tox in the top-level of the
project.