mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Move call_args definition to recording
This commit is contained in:
6
sith.py
6
sith.py
@@ -78,9 +78,6 @@ class TestCase(object):
|
|||||||
if operation not in self.operations:
|
if operation not in self.operations:
|
||||||
raise ValueError("%s is not a valid operation" % operation)
|
raise ValueError("%s is not a valid operation" % operation)
|
||||||
|
|
||||||
# Store call arguments
|
|
||||||
self.call_args = (operation, path, line, column, traceback)
|
|
||||||
|
|
||||||
# Set other attributes
|
# Set other attributes
|
||||||
self.operation = operation
|
self.operation = operation
|
||||||
self.path = path
|
self.path = path
|
||||||
@@ -128,8 +125,9 @@ class TestCase(object):
|
|||||||
except Exception:
|
except Exception:
|
||||||
self.traceback = traceback.format_exc()
|
self.traceback = traceback.format_exc()
|
||||||
if record is not None:
|
if record is not None:
|
||||||
|
call_args = (self.operation, self.path, self.line, self.column, self.traceback)
|
||||||
with open(record, 'w') as f:
|
with open(record, 'w') as f:
|
||||||
json.dump(self.call_args, f)
|
json.dump(call_args, f)
|
||||||
self.show_errors()
|
self.show_errors()
|
||||||
if debugger:
|
if debugger:
|
||||||
einfo = sys.exc_info()
|
einfo = sys.exc_info()
|
||||||
|
|||||||
Reference in New Issue
Block a user