]> rtime.felk.cvut.cz Git - wvtest.git/commitdiff
wvtest.py: handle lines that have trailing "# whatever" comments.
authorAvery Pennarun <apenwarr@gmail.com>
Tue, 4 May 2010 02:11:09 +0000 (22:11 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Sat, 26 Jun 2010 04:52:56 +0000 (00:52 -0400)
python/wvtest.py

index 7ae261a50bd6b7765b36ee5061950d4126a05b07..51a66b889e3bf22585ab0c649c405ac1b15f1671 100755 (executable)
@@ -44,7 +44,7 @@ if __name__ != "__main__":   # we're imported as a module
     
     def _code():
         (filename, line, func, text) = traceback.extract_stack()[-3]
-        text = re.sub(r'^\w+\((.*)\)$', r'\1', text);
+        text = re.sub(r'^\w+\((.*)\)(\s*#.*)?$', r'\1', text);
         return text