diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2017-11-10 18:33:02 -0200 |
---|---|---|
committer | Bruno Oliveira <nicoddemus@gmail.com> | 2017-11-10 18:33:02 -0200 |
commit | 983a09a2d49fddf277e587edc3e87eb8b8f34308 (patch) | |
tree | 145334a322267f2a6df3d981cb3f445e4e872300 /_pytest/_code/code.py | |
parent | c33074c8b9d11d0806ae7da73ad99d96a88539ab (diff) | |
parent | 66fbebfc264722137a223d1f918061c609ddd8a1 (diff) | |
download | pytest-983a09a2d49fddf277e587edc3e87eb8b8f34308.tar.gz |
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
Diffstat (limited to '_pytest/_code/code.py')
-rw-r--r-- | _pytest/_code/code.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/_pytest/_code/code.py b/_pytest/_code/code.py index 86ff66cdc..3fb232bd4 100644 --- a/_pytest/_code/code.py +++ b/_pytest/_code/code.py @@ -248,7 +248,7 @@ class TracebackEntry(object): line = str(self.statement).lstrip() except KeyboardInterrupt: raise - except: + except: # noqa line = "???" return " File %r:%d in %s\n %s\n" % (fn, self.lineno + 1, name, line) @@ -336,16 +336,16 @@ class Traceback(list): # XXX needs a test key = entry.frame.code.path, id(entry.frame.code.raw), entry.lineno # print "checking for recursion at", key - l = cache.setdefault(key, []) - if l: + values = cache.setdefault(key, []) + if values: f = entry.frame loc = f.f_locals - for otherloc in l: + for otherloc in values: if f.is_true(f.eval(co_equal, __recursioncache_locals_1=loc, __recursioncache_locals_2=otherloc)): return i - l.append(entry.frame.f_locals) + values.append(entry.frame.f_locals) return None @@ -476,12 +476,12 @@ class FormattedExcinfo(object): s = str(source.getstatement(len(source) - 1)) except KeyboardInterrupt: raise - except: + except: # noqa try: s = str(source[-1]) except KeyboardInterrupt: raise - except: + except: # noqa return 0 return 4 + (len(s) - len(s.lstrip())) |