summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorthatch <devnull@localhost>2009-09-18 17:35:42 -0700
committerthatch <devnull@localhost>2009-09-18 17:35:42 -0700
commit8ab7060aa657a47dee1301dea740f8efa6837158 (patch)
treec4781d212146288dd9136af869df73f0fc0195dd /tests
parent103d45d2fde775e335ed890a177f70dc04ad055f (diff)
downloadpygments-8ab7060aa657a47dee1301dea740f8efa6837158.tar.gz
Implement #437, making the Python traceback lexer cope with non-traceback
text. Also make the truncated traceback detection work for either type of `File...` line.
Diffstat (limited to 'tests')
-rw-r--r--tests/examplefiles/database.pytb4
-rw-r--r--tests/examplefiles/truncated.pytb15
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/examplefiles/database.pytb b/tests/examplefiles/database.pytb
index a3f99114..9138e01b 100644
--- a/tests/examplefiles/database.pytb
+++ b/tests/examplefiles/database.pytb
@@ -1,3 +1,5 @@
+Text before
+
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 314, in dispatch_request
dispatcher.dispatch(req)
@@ -14,3 +16,5 @@ Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/trac/db/sqlite_backend.py", line 36, in _rollback_on_error
return function(self, *args, **kwargs)
OperationalError: database is locked
+
+Text after
diff --git a/tests/examplefiles/truncated.pytb b/tests/examplefiles/truncated.pytb
new file mode 100644
index 00000000..ad5b6d49
--- /dev/null
+++ b/tests/examplefiles/truncated.pytb
@@ -0,0 +1,15 @@
+ File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 314, in dispatch_request
+ dispatcher.dispatch(req)
+ File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 186, in dispatch
+ req.session = Session(self.env, req)
+ File "/usr/lib/python2.3/site-packages/trac/web/session.py", line 52, in __init__
+ self.promote_session(sid)
+ File "/usr/lib/python2.3/site-packages/trac/web/session.py", line 125, in promote_session
+ "AND authenticated=0", (sid,))
+ File "/usr/lib/python2.3/site-packages/trac/db/util.py", line 47, in execute
+ return self.cursor.execute(sql_escape_percent(sql), args)
+ File "/usr/lib/python2.3/site-packages/trac/db/sqlite_backend.py", line 44, in execute
+ args or [])
+ File "/usr/lib/python2.3/site-packages/trac/db/sqlite_backend.py", line 36, in _rollback_on_error
+ return function(self, *args, **kwargs)
+OperationalError: database is locked