import nose
import angr
import subprocess

import logging
l = logging.getLogger('angr.tests.test_signed_div')

import os
test_location = str(os.path.dirname(os.path.realpath(__file__)))


def run_strtol(threads):
    test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_div")
    b = angr.Project(test_bin)

    pg = b.factory.path_group()
    pg.explore()
    out_angr = pg.deadended[0].state.posix.dumps(1)
    proc = subprocess.Popen(test_bin, stdout=subprocess.PIPE)
    stdout_real, _ = proc.communicate()

    nose.tools.assert_equal(out_angr, stdout_real)

def test_strtol():
    yield run_strtol, None
    yield run_strtol, 8

if __name__ == "__main__":
    run_strtol(4)

import nose
import angr
import subprocess

import logging
l = logging.getLogger('angr.tests.test_signed_div')

import os
test_location = str(os.path.dirname(os.path.realpath(__file__)))


def run_signed_div():
    test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_div")
    b = angr.Project(test_bin)

    pg = b.factory.path_group()
    pg.explore()
    out_angr = pg.deadended[0].state.posix.dumps(1)
    proc = subprocess.Popen(test_bin, stdout=subprocess.PIPE)
    stdout_real, _ = proc.communicate()

    nose.tools.assert_equal(out_angr, stdout_real)

def test_signed_div():
    yield run_signed_div

if __name__ == "__main__":
    run_signed_div()

Rename the signed_div test case, and ... disable the multithreaded test case.
Rename the signed_div test case, and ... disable the multithreaded test case.

  import nose
  import angr
  import subprocess
  
  import logging
  l = logging.getLogger('angr.tests.test_signed_div')
  
  import os
  test_location = str(os.path.dirname(os.path.realpath(__file__)))
  
  
- def run_strtol(threads):
+ def run_signed_div():
      test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_div")
      b = angr.Project(test_bin)
  
      pg = b.factory.path_group()
      pg.explore()
      out_angr = pg.deadended[0].state.posix.dumps(1)
      proc = subprocess.Popen(test_bin, stdout=subprocess.PIPE)
      stdout_real, _ = proc.communicate()
  
      nose.tools.assert_equal(out_angr, stdout_real)
  
+ def test_signed_div():
+     yield run_signed_div
- def test_strtol():
-     yield run_strtol, None
-     yield run_strtol, 8
  
  if __name__ == "__main__":
-     run_strtol(4)
+     run_signed_div()
  
Rename the signed_div test case, and ... disable the multithreaded test case.
## Code Before:
import nose
import angr
import subprocess

import logging
l = logging.getLogger('angr.tests.test_signed_div')

import os
test_location = str(os.path.dirname(os.path.realpath(__file__)))


def run_strtol(threads):
    test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_div")
    b = angr.Project(test_bin)

    pg = b.factory.path_group()
    pg.explore()
    out_angr = pg.deadended[0].state.posix.dumps(1)
    proc = subprocess.Popen(test_bin, stdout=subprocess.PIPE)
    stdout_real, _ = proc.communicate()

    nose.tools.assert_equal(out_angr, stdout_real)

def test_strtol():
    yield run_strtol, None
    yield run_strtol, 8

if __name__ == "__main__":
    run_strtol(4)

## Instruction:
Rename the signed_div test case, and ... disable the multithreaded test case.
## Code After:
import nose
import angr
import subprocess

import logging
l = logging.getLogger('angr.tests.test_signed_div')

import os
test_location = str(os.path.dirname(os.path.realpath(__file__)))


def run_signed_div():
    test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_div")
    b = angr.Project(test_bin)

    pg = b.factory.path_group()
    pg.explore()
    out_angr = pg.deadended[0].state.posix.dumps(1)
    proc = subprocess.Popen(test_bin, stdout=subprocess.PIPE)
    stdout_real, _ = proc.communicate()

    nose.tools.assert_equal(out_angr, stdout_real)

def test_signed_div():
    yield run_signed_div

if __name__ == "__main__":
    run_signed_div()
