Python test.support.check_syntax_error() Examples
The following are 5
code examples of test.support.check_syntax_error().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
test.support
, or try the search function
.
Example #1
Source File: test_test_support.py From ironpython2 with Apache License 2.0 | 5 votes |
def test_check_syntax_error(self): support.check_syntax_error(self, "def class", lineno=1, offset=9) with self.assertRaises(AssertionError): support.check_syntax_error(self, "x=1")
Example #2
Source File: test_support.py From Fluid-Designer with GNU General Public License v3.0 | 5 votes |
def test_check_syntax_error(self): support.check_syntax_error(self, "def class") self.assertRaises(AssertionError, support.check_syntax_error, self, "1")
Example #3
Source File: test_support.py From ironpython3 with Apache License 2.0 | 5 votes |
def test_check_syntax_error(self): support.check_syntax_error(self, "def class") self.assertRaises(AssertionError, support.check_syntax_error, self, "1")
Example #4
Source File: test_support.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 5 votes |
def test_check_syntax_error(self): support.check_syntax_error(self, "def class", lineno=1, offset=9) self.assertRaises(AssertionError, support.check_syntax_error, self, "1") #with self.assertRaises(AssertionError): #support.check_syntax_error(self, "x=1")
Example #5
Source File: test_support.py From android_universal with MIT License | 5 votes |
def test_check_syntax_error(self): support.check_syntax_error(self, "def class", lineno=1, offset=9) with self.assertRaises(AssertionError): support.check_syntax_error(self, "x=1")