Test
Tests for reprospect.test.
Environment
- class tests.test.test_environment.TestEnvironmentFieldView on GitHub
Bases:
objectTests for
reprospect.test.environment.EnvironmentField.- test_converter_from_default_type(monkeypatch) NoneView on GitHub
If no converter was provided, infer it from the type of the default value.
- test_in_environment_converted_no_env_key(monkeypatch) NoneView on GitHub
The attribute is correctly initialized from the environment (no key given), and converted.
- test_in_environment_converted_with_env_key(monkeypatch) NoneView on GitHub
The value is correctly initialized from the environment (given a key), and converted.
- test_no_attribute_name_or_env_key() NoneView on GitHub
Raises if neither an attribute name nor an environment key is given.
- test_not_in_environment_no_default() NoneView on GitHub
The attribute cannot be initialized.
- test_not_in_environment_use_default() NoneView on GitHub
The value is initialized to the given default value.
- test_read_int_converter(monkeypatch) NoneView on GitHub
Environment variable read as int.
- test_read_str_converter(monkeypatch) NoneView on GitHub
Environment variable read as str.
- test_reset(monkeypatch) NoneView on GitHub
- test_value_cached_at_class_level(monkeypatch) NoneView on GitHub
The value is shared among all instances.