mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Add testenv:sith in tox.ini
This commit is contained in:
4
sith.py
4
sith.py
@@ -86,6 +86,9 @@ class BaseAttacker(object):
|
|||||||
return self.record['data'][recid]
|
return self.record['data'][recid]
|
||||||
|
|
||||||
def save_record(self, path):
|
def save_record(self, path):
|
||||||
|
directory = os.path.dirname(path)
|
||||||
|
if not os.path.isdir(directory):
|
||||||
|
os.makedirs(directory)
|
||||||
with open(path, 'w') as f:
|
with open(path, 'w') as f:
|
||||||
json.dump(self.record, f)
|
json.dump(self.record, f)
|
||||||
|
|
||||||
@@ -251,6 +254,7 @@ class AttackApp(object):
|
|||||||
einfo = sys.exc_info()
|
einfo = sys.exc_info()
|
||||||
pdb = __import__(debugger)
|
pdb = __import__(debugger)
|
||||||
pdb.post_mortem(einfo if debugger == 'pudb' else einfo[2])
|
pdb.post_mortem(einfo if debugger == 'pudb' else einfo[2])
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
def add_parser(self, attacker_class, *args, **kwds):
|
def add_parser(self, attacker_class, *args, **kwds):
|
||||||
attacker = attacker_class()
|
attacker = attacker_class()
|
||||||
|
|||||||
Reference in New Issue
Block a user