]> sigrok.org Git - libsigrokdecode.git/blobdiff - tests/pdtest
tests/pdtest: Small fix to make it work with Python 3.2.
[libsigrokdecode.git] / tests / pdtest
index f70b743bd1ddc6c32a308dad88a506903c430041..d0717a8b8124fe9aea2e47ad0915909cf9602ec4 100755 (executable)
@@ -309,7 +309,7 @@ def run_tests(tests, fix=False):
         pd_cvg = []
         for tclist in tests[pd]:
             for tc in tclist:
-                args = cmd.copy()
+                args = cmd[:]
                 if DEBUG > 1:
                     args.append('-d')
                 # Set up PD stack for this test.
@@ -379,7 +379,7 @@ def run_tests(tests, fix=False):
                         os.unlink(outfile)
                     if op['type'] == 'exception' and 'error' in results[-1]:
                         # filter out the exception we were looking for
-                        reg = "^Error: srd: Protocol decoder instance %s: %s:" % (op['pd'], op['match'])
+                        reg = "^Error: srd: %s:" % op['match']
                         if re.match(reg, results[-1]['error']):
                             # found it, not an error
                             results[-1].pop('error')