def test_qeparser_comments(self): # Filters out comments parser = QEParser(filename = "ph.mgb2.in", type="ph") parser.parse() self.assertEqual(parser.toString(), fixtures.assertMgB2)
def test_qeparser_header(self): # Header for PH configuration files is mandatory parser = QEParser(configText = fixtures.textHeader, type="ph") parser.parse() self.assertEqual(parser.toString(), fixtures.assertHeader)
def test_qeparser_type(self): # Type of configuration file recognizes specific namelists and card only! parser = QEParser(configText = fixtures.textHeader, type="pw") parser.parse() self.assertEqual(parser.toString(), '') # namelist 'INPUTPH' is not recognized
def test_qeparser_card(self): # Card parser = QEParser(configText = fixtures.textCards) parser.parse() self.assertEqual(parser.toString(), fixtures.assertCards)
def test_qeparser_comma(self): # Parameters on the same line separated by comma - does not parse as it # should (intentionally) parser = QEParser(configText = fixtures.textComma, type="matdyn") parser.parse() self.assertEqual(parser.toString(), fixtures.assertComma)
def test_qeparser_dynmat(self): # Slash and name of namelist on the same line with parameters parser = QEParser(configText = fixtures.textDynmat, type="dynmat") parser.parse() self.assertEqual(parser.toString(), fixtures.assertDynmat)
def test_qeparser_file(self): # Configuration file parser = QEParser(filename = "ni.scf.in") parser.parse() self.assertEqual(parser.toString(), fixtures.assertFile)
def test_qeparser_comments(self): # Filters out comments parser = QEParser(filename="ph.mgb2.in", type="ph") parser.parse() self.assertEqual(parser.toString(), fixtures.assertMgB2)
def test_qeparser_matdyn(self): # Attachment after card parser = QEParser(configText = fixtures.textMatdyn, type="matdyn") parser.parse() self.assertEqual(parser.toString(), fixtures.assertMatdyn)
def test_qeparser_header(self): # Header for PH configuration files is mandatory parser = QEParser(configText=fixtures.textHeader, type="ph") parser.parse() self.assertEqual(parser.toString(), fixtures.assertHeader)
def test_qeparser_type(self): # Type of configuration file recognizes specific namelists and card only! parser = QEParser(configText=fixtures.textHeader, type="pw") parser.parse() self.assertEqual(parser.toString(), '') # namelist 'INPUTPH' is not recognized
def test_qeparser_comma(self): # Parameters on the same line separated by comma - does not parse as it # should (intentionally) parser = QEParser(configText=fixtures.textComma, type="matdyn") parser.parse() self.assertEqual(parser.toString(), fixtures.assertComma)
def test_qeparser_card(self): # Card parser = QEParser(configText=fixtures.textCards) parser.parse() self.assertEqual(parser.toString(), fixtures.assertCards)
def test_qeparser_file(self): # Configuration file parser = QEParser(filename="ni.scf.in") parser.parse() self.assertEqual(parser.toString(), fixtures.assertFile)
def test_qeparser_dynmat(self): # Slash and name of namelist on the same line with parameters parser = QEParser(configText=fixtures.textDynmat, type="dynmat") parser.parse() self.assertEqual(parser.toString(), fixtures.assertDynmat)
def test_qeparser_matdyn(self): # Attachment after card parser = QEParser(configText=fixtures.textMatdyn, type="matdyn") parser.parse() self.assertEqual(parser.toString(), fixtures.assertMatdyn)