Module Import alias Import alias ImportFrom alias alias Import alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore Call NameLoad Str keyword Str keyword Call NameLoad Str Assign NameStore Call NameLoad Str keyword NameLoad keyword Call NameLoad Str decorator_list ClassDef bases AttributeLoad NameLoad attr NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Delete AttributeDel NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad Str keyword ListLoad keyword Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameLoad body ClassDef bases NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameLoad body ClassDef bases NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad Str keyword ListLoad Call NameLoad Str Call NameLoad Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str keyword ListLoad Call NameLoad Str Call NameLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameLoad body ClassDef bases NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str decorator_list decorator_list FunctionDef arguments args NameParam defaults body ClassDef bases NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str keyword ListLoad Call NameLoad Str Call NameLoad Str decorator_list With Call AttributeLoad NameLoad attr NameLoad body Assign AttributeStore Call AttributeLoad NameLoad attr attr Call NameLoad Str Assign AttributeStore Call AttributeLoad NameLoad attr attr Call NameLoad Str Assign AttributeStore Call AttributeLoad NameLoad attr attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body ClassDef bases NameLoad body Assign NameStore Call NameLoad Str keyword ListLoad Call NameLoad Str Call NameLoad Str keyword Str keyword Call NameLoad Str decorator_list Assign NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str With Call AttributeLoad NameLoad attr NameLoad body Assign NameStore AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad Str keyword Str body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Delete AttributeDel NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str With Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad Call NameLoad Str attr Str decorator_list decorator_list
N/A N/A json N/A os pathlib Path PurePosixPath N/A unittest unittest.mock patch nativeconfig.exceptions InitializationError DeserializationError ValidationError nativeconfig.options.path_option PathOption test DummyMemoryConfig test.options TestOptionMixin MyConfig N/A DummyMemoryConfig N/A N/A my_path N/A PathOption MyPath env_name MY_PATH default N/A Path . N/A pure_path N/A PathOption PurePath path_type PurePosixPath default N/A PurePosixPath . N/A TestPathOption N/A N/A unittest TestCase TestOptionMixin N/A setUpClass N/A N/A cls N/A N/A N/A N/A cls OPTION_TYPE PathOption N/A classmethod tearDown N/A N/A self N/A N/A N/A c N/A N/A MyConfig get_instance N/A N/A c my_path N/A N/A N/A N/A os environ pop MY_PATH None N/A test_choices_cannot_be_empty N/A N/A self N/A N/A N/A c N/A N/A MyConfig get_instance N/A N/A N/A self assertRaises InitializationError N/A N/A N/A c empty_choices N/A PathOption EmptyChoices choices N/A default N/A Path . N/A test_path_type_must_be_subclass_of_purepath N/A N/A self N/A N/A N/A N/A N/A self assertRaises InitializationError N/A MyConfig N/A DummyMemoryConfig N/A N/A option N/A N/A self OPTION_TYPE Bar path_type PathOption N/A N/A test_path_type_cannot_be_none N/A N/A self N/A N/A N/A N/A N/A self assertRaises InitializationError N/A MyConfig N/A DummyMemoryConfig N/A N/A option N/A N/A self OPTION_TYPE Baz path_type None N/A N/A test_default_value_must_be_one_of_choices_if_any N/A N/A self N/A N/A N/A c N/A N/A MyConfig get_instance N/A N/A N/A self assertRaises ValidationError N/A N/A N/A c invalid_default_choice N/A PathOption InvalidDefaultChoice choices N/A N/A Path . N/A Path /usr/bin default . N/A test_all_choices_must_be_valid N/A N/A self N/A N/A N/A c N/A N/A MyConfig get_instance N/A N/A N/A self assertRaises ValidationError N/A N/A N/A c invalid_choices N/A N/A self OPTION_TYPE InvalidChoices choices N/A N/A Path . N/A Path /usr/bin . N/A test_default_must_be_valid N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValidationError N/A MyConfig N/A DummyMemoryConfig N/A N/A invalid_default N/A N/A self OPTION_TYPE InvalidDefault default /usr/bin N/A N/A test_value_must_be_one_of_choices_if_any N/A N/A self N/A N/A MyConfig N/A DummyMemoryConfig N/A N/A value_with_choices N/A N/A self OPTION_TYPE ValueWithChoices choices N/A N/A Path . N/A Path C:\Windows N/A N/A N/A N/A self assertRaises ValidationError N/A N/A N/A N/A N/A MyConfig get_instance value_with_choices N/A Path / N/A N/A N/A N/A MyConfig get_instance value_with_choices N/A Path . N/A N/A N/A N/A MyConfig get_instance value_with_choices N/A Path C:\Windows N/A test_serialize_json N/A N/A self N/A N/A N/A c N/A N/A MyConfig get_instance N/A N/A c my_path N/A Path . N/A N/A N/A self assertEqual N/A N/A c get_json_value_for_option_name MyPath "." N/A test_serialize_json_None N/A N/A self N/A N/A N/A o N/A PathOption MyPath N/A N/A N/A self assertEqual N/A N/A o serialize_json None N/A N/A json dumps None N/A test_deserialize_json N/A N/A self N/A N/A N/A c N/A N/A MyConfig get_instance N/A N/A N/A c set_json_value_for_option_name MyPath "." N/A N/A N/A self assertEqual N/A c my_path N/A Path . N/A test_value_can_be_overridden_by_env N/A N/A self N/A N/A N/A N/A N/A os environ N/A MY_PATH "/home/user" N/A c N/A N/A MyConfig get_instance N/A N/A N/A self assertEqual N/A c my_path N/A Path /home/user N/A test_value_can_be_overridden_by_one_shot_value N/A N/A self N/A N/A N/A c N/A N/A MyConfig get_instance N/A N/A N/A c set_one_shot_json_value_for_option_name MyPath "/home/user" N/A N/A N/A self assertEqual N/A c my_path N/A Path /home/user N/A test_value_that_cannot_be_deserialized_calls_resolver N/A N/A self N/A N/A N/A N/A test_invalid_deserialized_value_calls_resolver N/A N/A self N/A N/A Paths N/A DummyMemoryConfig N/A N/A path N/A PathOption Path choices N/A N/A Path / N/A Path /home/user env_name PATH_OPTION default N/A Path / N/A N/A c N/A N/A Paths get_instance N/A N/A N/A os environ N/A PATH_OPTION "/home/hello" N/A N/A N/A self assertRaises ValidationError N/A N/A my_path N/A c path N/A N/A N/A patch object DummyMemoryConfig resolve_value return_value unresolved N/A N/A my_path N/A c path N/A N/A N/A self assertEqual my_path unresolved N/A N/A N/A os environ N/A PATH_OPTION "/home/user" N/A my_path N/A c path N/A N/A N/A self assertEqual my_path N/A Path /home/user N/A test_setting_value_resets_one_shot_value N/A N/A self N/A N/A N/A c N/A N/A MyConfig get_instance N/A N/A N/A c set_one_shot_json_value_for_option_name MyPath "/home/user" N/A N/A c my_path N/A Path /home/none N/A N/A N/A self assertEqual N/A c my_path N/A Path /home/none N/A test_setting_invalid_value_raises_exception N/A N/A self N/A N/A N/A c N/A N/A MyConfig get_instance N/A N/A N/A self assertRaises ValidationError N/A N/A N/A c my_path young N/A test_setting_none_deletes_value N/A N/A self N/A N/A N/A c N/A N/A MyConfig get_instance N/A N/A c my_path N/A Path C:\users\User N/A N/A c my_path None N/A N/A N/A self assertEqual N/A c my_path N/A Path . N/A test_deleting_value N/A N/A self N/A N/A N/A c N/A N/A MyConfig get_instance N/A N/A c my_path N/A N/A N/A self assertEqual N/A c my_path N/A Path . N/A test_env_value_must_be_valid_json N/A N/A self N/A N/A N/A N/A N/A os environ N/A MY_PATH ] N/A N/A N/A self assertRaises DeserializationError N/A N/A c N/A N/A MyConfig get_instance N/A my_path N/A c my_path N/A N/A N/A os environ N/A MY_PATH ".." N/A N/A N/A self assertEqual N/A c my_path N/A Path .. N/A test_json_value_is_of_expected_type N/A N/A self N/A N/A N/A N/A N/A self assertRaises DeserializationError N/A N/A N/A N/A N/A PathOption _ deserialize_json 1 N/A N/A