manticore/tests/test_driver.py
JP Smith e32701f978 Refactor logging (#140)
* begin refactoring logging to use manticore object

* fix verbosity things

* fix logging when in scripts

* remove m.log_file now that it's no longer used

* remove unnecessary init_logging usage and unused log_debug variable

* accidentally deleted the wrong line

* re-hide init_logging

* remove old log_debug

* remove unnecessary API stuff and refactor around that

* re-introduce logging PR

* fix Popen

* lost a line in merge

* fix test_binaries

* Log to stdout instead of stderr

* implement mark's changes
2017-04-19 01:21:14 -05:00

37 lines
784 B
Python

import unittest
import sys
import shutil
import tempfile
import os
import hashlib
import subprocess
import collections
import time
from manticore import Manticore, issymbolic
from manticore.core.smtlib import BitVecVariable
class ManticoreDriver(unittest.TestCase):
def setUp(self):
# Create a temporary directory
self.test_dir = tempfile.mkdtemp()
def tearDown(self):
# Remove the directory after the test
shutil.rmtree(self.test_dir)
def testCreating(self):
m = Manticore('/bin/ls')
m.log_file = '/dev/null'
def test_issymbolic(self):
v = BitVecVariable(32, 'sym')
self.assertTrue(issymbolic(v))
def test_issymbolic_neg(self):
v = 1
self.assertFalse(issymbolic(v))