# Path: wa/framework/exception.py
# class ConfigError(WAError):
#     """Raised when configuration provided is invalid. This error suggests that
#     the user should modify their config and try again."""


import os
from unittest import TestCase
from nose.tools import assert_equal, raises, assert_true
from wa.framework.plugin import Plugin, PluginMeta, PluginLoader, Parameter
from wa.utils.types import list_of_ints
from wa import ConfigError

    def test_validation_ok(self):
        myext = MyOtherPlugin(mandatory='check', optional='check')
        myext.validate()

    def test_default_override(self):
        myext = MyOverridingPlugin()
        assert_equal(myext.hydrochloric, [3, 4])
        myotherext = MyThirdTeerPlugin()
        assert_equal(myotherext.hydrochloric, [3, 4])

    def test_multivalue_param(self):
        myext = MultiValueParamExt(test=[7, 42])
        myext.validate()
        assert_equal(myext.test, [7, 42])

    @raises(ConfigError)
    def test_bad_multivalue_param(self):
        myext = MultiValueParamExt(test=[5])
        myext.validate()

    @raises(ConfigError)
    def test_validation_no_mandatory(self):
        myext = MyOtherPlugin(optional='check')
        myext.validate()

    @raises(ConfigError)
    def test_validation_no_mandatory_in_derived(self):
        MyOtherOtherPlugin()


# Path: wa/framework/exception.py
# class ConfigError(WAError):
#     """Raised when configuration provided is invalid. This error suggests that
#     the user should modify their config and try again."""


# Path: tests/test_plugin.py
import os
from unittest import TestCase
from nose.tools import assert_equal, raises, assert_true
from wa.framework.plugin import Plugin, PluginMeta, PluginLoader, Parameter
from wa.utils.types import list_of_ints
from wa import ConfigError


    def test_validation_ok(self):
        myext = MyOtherPlugin(mandatory='check', optional='check')
        myext.validate()

    def test_default_override(self):
        myext = MyOverridingPlugin()
        assert_equal(myext.hydrochloric, [3, 4])
        myotherext = MyThirdTeerPlugin()
        assert_equal(myotherext.hydrochloric, [3, 4])

    def test_multivalue_param(self):
        myext = MultiValueParamExt(test=[7, 42])
        myext.validate()
        assert_equal(myext.test, [7, 42])

    @raises(ConfigError)
    def test_bad_multivalue_param(self):
        myext = MultiValueParamExt(test=[5])
        myext.validate()

    @raises(ConfigError)
    def test_validation_no_mandatory(self):
        myext = MyOtherPlugin(optional='check')
        myext.validate()

    @raises(ConfigError)
    def test_validation_no_mandatory_in_derived(self):
        MyOtherOtherPlugin()


    @raises(ConfigError)