armi.settings.tests.test_settings module

Tests for new settings system with plugin import

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

Bases: armi.plugins.ArmiPlugin

static defineSettings()[source]
class armi.settings.tests.test_settings.DummyPlugin2[source]

Bases: armi.plugins.ArmiPlugin

static defineSettings()[source]
class armi.settings.tests.test_settings.PluginAddsOptions[source]

Bases: armi.plugins.ArmiPlugin

static defineSettings()[source]
class armi.settings.tests.test_settings.TestCaseSettings(methodName='runTest')[source]

Bases: unittest.case.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]
class armi.settings.tests.test_settings.TestAddingOptions(methodName='runTest')[source]

Bases: unittest.case.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: unittest.case.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_default()[source]

Make sure default updating mechanism works.

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: unittest.case.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: unittest.case.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.