Beispiel #1
0
def test_prefix_empty():
    """
    assert True when non-empty string is given
    """
    with patch.object(SetupAMR, "__init__", lambda x: None):
        amr_obj = SetupAMR()
        amr_obj.prefix = ""
        amr_obj.logger = logging.getLogger(__name__)
        with pytest.raises(SystemExit):
            amr_obj._check_prefix()
Beispiel #2
0
def test_prefix_string():
    """
    assert True when non-empty string is given
    """
    with patch.object(SetupAMR, "__init__", lambda x: None):
        amr_obj = SetupAMR()
        amr_obj.prefix = "some_isolate"
        amr_obj.logger = logging.getLogger(__name__)
        assert amr_obj._check_prefix()