b3j0f.utils.test.property module

class b3j0f.utils.test.property.FindCTXTest(*args, **kwargs)[source]

Bases: b3j0f.utils.ut.UTCase

Test find_ctx method

test_instance_method()[source]

Test instance method ctx

test_method()[source]

Test method ctx

test_notctx()[source]

Test with elt without ctx

class b3j0f.utils.test.property.OneTest(*args, **kwargs)[source]

Bases: b3j0f.utils.ut.UTCase

UT for get_local_property, get_first_property and get_first_properties.

tearDown()[source]

delete properties.

test_first()[source]

test first on existing property

test_first_none()[source]

test first default.

test_firsts()[source]

test firsts on existing property

test_firsts_none()[source]

test firsts default.

test_local()[source]

test local with existing property.

test_none_local()[source]

test local default.

class b3j0f.utils.test.property.PropertyTest(*args, **kwargs)[source]

Bases: b3j0f.utils.ut.UTCase

Test scenarios of puting/getting/deleting properties.

test_bound_method()[source]

Test scenario on a bound method.

test_builtin()[source]

Test lookup of builtin

test_class()[source]

Test scenario on a class.

test_dict()[source]

Test scenario on a dictionary.

test_function()[source]

Test scenario on a function.

test_inheritance()[source]

Test scenario on inherited methods

test_instance()[source]

Test scenario on an instance.

test_lambda()[source]

Test scenario on a lambda expression

test_list()[source]

Test scenario on a list.

test_method()[source]

Test scenario on a method.

test_module()[source]

Test scenario on a module.

test_namespace()[source]

Test scenario on a namespace.

test_none()[source]

Test scenario on None

test_object()[source]

Test scenario on an object

test_property_module()[source]

Test scenario on the property module.

class b3j0f.utils.test.property.RemoveCTXTest(*args, **kwargs)[source]

Bases: b3j0f.utils.ut.UTCase

Test remove_ctx function.

test_empty()[source]

Test with empty properties.

test_no_properties()[source]

Test if not properties exist.

test_one()[source]

Test with one value property.

test_properties()[source]

Test with many property values.

class b3j0f.utils.test.property.SetDefaultTest(*args, **kwargs)[source]

Bases: b3j0f.utils.ut.UTCase

Test setdefault function

setUp()[source]

Set attributes to self key=test and new_value=2

tearDown()[source]

del properties

test_exists()[source]

Test with an existing property

test_new()[source]

Test on a missing property

class b3j0f.utils.test.property.TTLTest(*args, **kwargs)[source]

Bases: b3j0f.utils.ut.UTCase

Test ttl parameters while puting property.

tearDown()[source]

Del properties at the end of tests.

test_100()[source]

Test with ttl = 100

test_zero()[source]

Test with ttl = 0

class b3j0f.utils.test.property.TestAddProperties(*args, **kwargs)[source]

Bases: b3j0f.utils.ut.UTCase

Test the addproperties decorator.

deleter(name=None)[source]

Property deleter.

getter(name=None)[source]

Property getter.

setUp()[source]
setter(value, name=None)[source]

Property setter.

test_ab()[source]

Test after/before getter/setter/deleter.

test_empty_cls()[source]

Test to add properties on an empty cls.

test_not_empty_cls()[source]

Test to add properties with existing properties.

class b3j0f.utils.test.property.UnifyTest(*args, **kwargs)[source]

Bases: b3j0f.utils.ut.UTCase

Test firsts function.

test_empty()[source]

Test empty properties.

test_one_value()[source]

Test one property

test_values()[source]

Test several properties.

b3j0f.utils.test.property.random() → x in the interval [0, 1).