[Python-checkins] python/dist/src/Lib/test test_eof.py, 1.1.10.1,
1.1.10.2
jhylton at users.sourceforge.net
jhylton at users.sourceforge.net
Fri Apr 23 22:31:37 EDT 2004
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3915
Modified Files:
Tag: ast-branch
test_eof.py
Log Message:
Revise test to reflect the new "<string>" part of the error message.
Index: test_eof.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_eof.py,v
retrieving revision 1.1.10.1
retrieving revision 1.1.10.2
diff -C2 -d -r1.1.10.1 -r1.1.10.2
*** test_eof.py 28 Apr 2003 17:28:51 -0000 1.1.10.1
--- test_eof.py 24 Apr 2004 02:31:35 -0000 1.1.10.2
***************
*** 8,26 ****
class EOFTestCase(unittest.TestCase):
def test_EOFC(self):
try:
eval("""'this is a test\
""")
except SyntaxError, msg:
! self.assertEqual(str(msg),
! "EOL while scanning single-quoted string (line 1)")
else:
raise test_support.TestFailed
def test_EOFS(self):
try:
eval("""'''this is a test""")
except SyntaxError, msg:
! self.assertEqual(str(msg),
! "EOF while scanning triple-quoted string (line 1)")
else:
raise test_support.TestFailed
--- 8,26 ----
class EOFTestCase(unittest.TestCase):
def test_EOFC(self):
+ expect = "EOL while scanning single-quoted string (<string>, line 1)"
try:
eval("""'this is a test\
""")
except SyntaxError, msg:
! self.assertEqual(str(msg), expect)
else:
raise test_support.TestFailed
def test_EOFS(self):
+ expect = "EOF while scanning triple-quoted string (<string>, line 1)"
try:
eval("""'''this is a test""")
except SyntaxError, msg:
! self.assertEqual(str(msg), expect)
else:
raise test_support.TestFailed
More information about the Python-checkins
mailing list