tests.structure.test_singleton

tests.structure.test_singleton#

Unit tests for structure.singleton metaclasses.

This’ll be fun!!

Functions

test_semi_singleton_access_stresstest()

Access a semi-singleton a lot.

test_semi_singleton_args_pattern_default_hashfunc()

Exercise semi-singleton's response to *args pattern using default hashfunc.

test_semi_singleton_bothargs_patterns_default_hashfunc()

Exercise semi-singleton's response to *args, **kwargs pattern using default hashfunc.

test_semi_singleton_clear()

Ensure semi-singletons can be cleared.

test_semi_singleton_create_stresstest()

Create and access a semi-singleton object a lot.

test_semi_singleton_custom_hashfunc()

Exercise usage of custom hashfuncs for semi-singleton identification.

test_semi_singleton_get()

Ensure we can get all the values of semi-singletons.

test_semi_singleton_kwargs_patterns_default_hashfunc()

Exercise semi-singleton's response to **kwargs pattern using default hashfunc.

test_semi_singleton_noarg_default_hashfunc()

Exercise semi-singleton's response to no-argument classes using default hashfunc.

test_semi_singleton_smoketest()

Quick it's-still-in-dev smoketest for semisingletons.

test_true_singleton_access_stresstest()

Access a TrueSingleton object a lot.

test_true_singleton_arg_patterns()

Exercise TrueSingleton's response to class argument patterns.

test_true_singleton_clear()

Ensure TrueSingletons can all be cleared.

test_true_singleton_clear_specific()

Ensure TrueSingletons can be cleared individually.

test_true_singleton_clear_specific_not_present()

Ensure calling clear on an un-set singleton is safe.

test_true_singleton_create_stresstest()

Create and access a TrueSingleton object a lot.

test_true_singleton_smoketest()

Quick it's-still-in-dev smoketest for true singletons.