Пример #1
0
    def test_parseinstr_mixedmaps(self):
        """Test an input file which mixes the input files and mapping
           declarations (which is not permitted)"""

        test = "zomg.wad\n0 0 31 0\nfoo.wad".split("\n")
        with self.assertRaises(Exception):
            parseinstr(test)
Пример #2
0
 def test_parseinstr_comments(self):
     comment_examples = ["# hi there","    # more comments" "", "#", "   "]
     self.assertEqual(parseinstr(comment_examples), ([], []))
Пример #3
0
 def test_parseinstr_shortmaps(self):
     test = ["zomg.wad\n","0 31 0\n"]
     self.assertEqual(parseinstr(test), (["zomg.wad","0 31 0"],[]))
Пример #4
0
 def test_parseinstr_allgood(self):
     test = ["zomg.wad\n","0 0 31 0\n"]
     self.assertEqual(parseinstr(test), (["zomg.wad"],[[0,0,31,0]]))