armi.settings.tests.test_settings module

Tests for new settings system with plugin import.

class armi.settings.tests.test_settings.DummySettingPlugin1[source]

Bases: ArmiPlugin

static defineSettings()[source]

Define settings for the plugin.

class armi.settings.tests.test_settings.DummySettingPlugin2[source]

Bases: ArmiPlugin

static defineSettings()[source]

Define settings for the plugin.

class armi.settings.tests.test_settings.PluginAddsOptions[source]

Bases: ArmiPlugin

static defineSettings()[source]

Define settings for the plugin.

class armi.settings.tests.test_settings.TestSettings(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_updateEnvironmentSettingsFrom()[source]
test_metaData()[source]

Test we can get and set the important settings metadata.

class armi.settings.tests.test_settings.TestAddingOptions(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_addingOptions()[source]
class armi.settings.tests.test_settings.TestSettings2(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_schemaChecksType()[source]
test_listsMutable()[source]
test_listCoercion()[source]

Make sure list setting values get coerced right.

test_typeDetection()[source]

Ensure some of the type inference operations work.

test_csWorks()[source]

Ensure plugin settings become available and have defaults.

test_pluginValidatorsAreDiscovered()[source]
test_pluginSettings()[source]

Test settings change depending on what plugins are registered.

test_default()[source]

Make sure default updating mechanism works.

test_getSettingsSetByUser()[source]
test_setModuleVerbosities()[source]
test_getFailures()[source]

Make sure the correct error is thrown when getting a nonexistent setting.

test_settingIsOkayToGrab()[source]
test_modified()[source]

Prove that using the modified() method does not mutate the original object.

test_copySetting()[source]

Ensure that when we copy a Setting() object, the result is sound.

Notes

In particuar, self.schema and self._customSchema on a Setting object are removed by Setting.__getstate__, and that has been a problem in the past.

test_copySettingNotDefault()[source]

Ensure that when we copy a Setting() object, the result is sound when the Setting value is set to a non-default value.

test_empty()[source]
class armi.settings.tests.test_settings.TestSettingsUtils(methodName='runTest')[source]

Bases: TestCase

Tests for utility functions.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_recursiveScan()[source]
test_prompt()[source]
class armi.settings.tests.test_settings.TestFlagListSetting(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_flagListSetting()[source]

Test that a list of strings can be converted to a list of flags and back.

test_invalidFlagListTypeError()[source]

Test raising a TypeError when a list is not provided.

class armi.settings.tests.test_settings.TestSettingsValidationUtils(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_validateVersion()[source]