def test_23b(): subjects = Keywords() subjects.add("qcdb", Keyword(keyword="scf_e_conv", default=5, validator=parsers.parse_convergence)) subjects.suggest("qcdb", "e_conv", 1.0e-6, 1234) assert subjects.scroll["QCDB"]["SCF_E_CONV"].value == 1.0e-5
def test_21b(): subjects = Keywords() with pytest.raises(qcdb.ValidationError): subjects.require("qcdb", "mmry", "4 gb", 1234)
def test_22e(): subjects = Keywords() subjects.add("qcdb", Keyword(keyword="memory", default="700 mb", validator=parsers.parse_memory)) assert subjects.scroll["QCDB"]["MEMORY"].value == 700000000 assert subjects.scroll["QCDB"]["MEMORY"].is_default() is True
def test_21a(): subjects = Keywords() with pytest.raises(qcdb.ValidationError): subjects.add("random", Keyword(keyword="memory", default="700 mb", validator=parsers.parse_memory))