From 764151de7158ac3d3f4c8e8570d1fa584c94e7fc Mon Sep 17 00:00:00 2001 From: Daniel Bolognino Date: Wed, 6 Dec 2017 18:51:20 -0500 Subject: [PATCH] Emit .input instead of .txt files in workspace (#625) Related: #612 * Update workspace.py Changed extension to .input * Update test_workspace.py * changed key value pair in test_workspace bc of change of extension to .input in workspace.py, fixed issue #618 * removed unwanted directories * Update seth.py * Update seth.py Change in Documentation issue #612 --- manticore/core/workspace.py | 2 +- manticore/seth.py | 4 ++-- tests/test_workspace.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manticore/core/workspace.py b/manticore/core/workspace.py index a771082..3bb0a46 100644 --- a/manticore/core/workspace.py +++ b/manticore/core/workspace.py @@ -528,7 +528,7 @@ class ManticoreOutput(object): f.write(str(state.constraints)) def save_input_symbols(self, state): - with self._named_stream('txt') as f: + with self._named_stream('input') as f: for symbol in state.input_symbols: buf = solver.get_value(state.constraints, symbol) f.write('%s: %s\n' % (symbol.name, repr(buf))) diff --git a/manticore/seth.py b/manticore/seth.py index d4421e6..982eaf1 100644 --- a/manticore/seth.py +++ b/manticore/seth.py @@ -330,7 +330,7 @@ class ManticoreEVM(Manticore): :type balance: int or SValue :param address: the address for the new contract (optional) :type address: int or EVMAccount - :return: an EVMAccount + :return: an EVMAccount address (long) ''' with self.locked_context('seth') as context: assert context['_pending_transaction'] is None @@ -350,7 +350,7 @@ class ManticoreEVM(Manticore): :type balance: int or SValue :param address: the address for the new contract (optional) :type address: int or EVMAccount - :return: an EVMAccount + :return: an EVMAccount address (long) ''' with self.locked_context('seth') as context: assert context['_pending_transaction'] is None diff --git a/tests/test_workspace.py b/tests/test_workspace.py index 6869f7b..85266ca 100644 --- a/tests/test_workspace.py +++ b/tests/test_workspace.py @@ -106,5 +106,5 @@ class StateTest(unittest.TestCase): self.assertIn('smt', keys) self.assertIn('trace', keys) self.assertIn('messages', keys) - self.assertIn('txt', keys) + self.assertIn('input', keys) self.assertIn('pkl', keys)