コード例 #1
0
ファイル: parser.py プロジェクト: rhblind/brewery
 def test_to_dict_as_file(self):
     """
     Test to_tuple method on all example files
     as xml string object
     """
     for f in FILES:
         with open(os.path.join(EXAMPLES_DIR, f), "r") as fname:
             self.assertIsInstance(fname, file)  # make sure fname is file
             parser.to_dict(fname)
コード例 #2
0
ファイル: parser.py プロジェクト: rhblind/brewery
 def test_to_dict_as_str(self):
     """
     Test to_tuple method on all example files
     as xml string object
     """
     for f in FILES:
         with open(os.path.join(EXAMPLES_DIR, f), "r") as fname:
             xml_str = fname.read()               # test xml as str
             self.assertIsInstance(xml_str, str)  # make sure xml is str
             parser.to_dict(xml_str)