Utilities for deriving new names from existing names.
Style objects are used to customize how storable objects are found for DataSet objects
Utility for deriving new names from existing names.
each method receives a name and returns a new name.
Bases: fixture.style.Style
Style that honors all original names.
Bases: fixture.style.TrimmedNameStyle
Derives names from datasets assuming “Data” as a suffix.
for example, consider this data object and this DataSet:
>>> class Author(object):
... name = None
...
>>> from fixture import DataSet
>>> class AuthorData(DataSet):
... class freude:
... name = "Sigmund Freude"
...
if a LoadableFixture is configured with style=NamedDataStyle() then it will automatically look in its env for the object “Author” when loading the DataSet named “AuthorData”
Bases: fixture.style.Style
Derives new names from trimming off prefixes/suffixes.
Bases: fixture.style.Style
Derives new names from padding names with prefixes/suffixes.
Bases: fixture.style.Style
Style that assumes classes are already in came case but attributes should be underscore separated
Assume a storage name is the same as original.
i.e. Employee becomes Employee
Derives lower case, underscored names from camel case class names.
i.e. EmployeeData translates to employee_data