File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,12 @@ def buildTestSuite():
1111 return suite
1212
1313def main ():
14+ # the following is temporary while the unit tests for parse errors are
15+ # still in flux
16+ if '-p' in sys .argv : # suppress check for parse errors
17+ import test_parser
18+ test_parser .checkParseErrors = False
19+
1420 unittest .TextTestRunner ().run (buildTestSuite ())
1521
1622if __name__ == "__main__" :
Original file line number Diff line number Diff line change 2424 print 'module ElementTree not found, skipping etree tests'
2525
2626#Run the parse error checks
27- #XXX - ideally want this to be a command line argument
2827checkParseErrors = True
2928
3029def parseTestcase (testString ):
@@ -109,6 +108,13 @@ def buildTestSuite():
109108 return unittest .TestLoader ().loadTestsFromTestCase (TestCase )
110109
111110def main ():
111+ # the following is temporary while the unit tests for parse errors are
112+ # still in flux
113+ if '-p' in sys .argv : # suppress check for parse errors
114+ sys .argv .remove ('-p' )
115+ global checkParseErrors
116+ checkParseErrors = False
117+
112118 buildTestSuite ()
113119 unittest .main ()
114120
You can’t perform that action at this time.
0 commit comments