def test_create(self) -> None: parser = configparser.ConfigParser() parser.read_string( """ [section] processes = foo, bar, narf """ ) assert Processes.create("name", parser["section"])._processes == [ "foo", "bar", "narf", ]
def test_create_no_entry(self) -> None: parser = configparser.ConfigParser() parser.read_string("""[section]""") with pytest.raises(ConfigurationError): Processes.create("name", parser["section"])
def test_create_no_entry(self): parser = configparser.ConfigParser() parser.read_string('''[section]''') with pytest.raises(ConfigurationError): Processes.create('name', parser['section'])
def test_create(self): parser = configparser.ConfigParser() parser.read_string('''[section] processes = foo, bar, narf''') assert Processes.create( 'name', parser['section'])._processes == ['foo', 'bar', 'narf']