
from os.path import join as pjoin, dirname, split as psplit
import shutil
from tempfile import mkdtemp
from subprocess import call

from nose.tools import assert_true, assert_equal, assert_raises


def test_dumper():
    downpath, _ = psplit(dirname(__file__))
    exe_pth = pjoin(downpath, 'gitwash_dumper.py')
    tmpdir = mkdtemp()
    try:
        call([exe_pth,
              tmpdir,
              'my_project'])
    finally:
        shutil.rmtree(tmpdir)



from os.path import join as pjoin, dirname, split as psplit
import shutil
from tempfile import mkdtemp
from subprocess import call

from nose.tools import assert_true, assert_equal, assert_raises

_downpath, _ = psplit(dirname(__file__))
EXE_PTH = pjoin(_downpath, 'gitwash_dumper.py')
TMPDIR = None

def setup():
    global TMPDIR
    TMPDIR = mkdtemp()


def teardown():
    shutil.rmtree(TMPDIR)


def test_dumper():
    call([EXE_PTH,
          TMPDIR,
          'my_project'])


TEST - setup teardown for test
TEST - setup teardown for test

  
  from os.path import join as pjoin, dirname, split as psplit
  import shutil
  from tempfile import mkdtemp
  from subprocess import call
  
  from nose.tools import assert_true, assert_equal, assert_raises
  
+ _downpath, _ = psplit(dirname(__file__))
+ EXE_PTH = pjoin(_downpath, 'gitwash_dumper.py')
+ TMPDIR = None
+ 
+ def setup():
+     global TMPDIR
+     TMPDIR = mkdtemp()
+ 
+ 
+ def teardown():
+     shutil.rmtree(TMPDIR)
+ 
  
  def test_dumper():
+     call([EXE_PTH,
+           TMPDIR,
-     downpath, _ = psplit(dirname(__file__))
-     exe_pth = pjoin(downpath, 'gitwash_dumper.py')
-     tmpdir = mkdtemp()
-     try:
-         call([exe_pth,
-               tmpdir,
-               'my_project'])
+           'my_project'])
-     finally:
-         shutil.rmtree(tmpdir)
  
  
TEST - setup teardown for test
## Code Before:

from os.path import join as pjoin, dirname, split as psplit
import shutil
from tempfile import mkdtemp
from subprocess import call

from nose.tools import assert_true, assert_equal, assert_raises


def test_dumper():
    downpath, _ = psplit(dirname(__file__))
    exe_pth = pjoin(downpath, 'gitwash_dumper.py')
    tmpdir = mkdtemp()
    try:
        call([exe_pth,
              tmpdir,
              'my_project'])
    finally:
        shutil.rmtree(tmpdir)


## Instruction:
TEST - setup teardown for test
## Code After:

from os.path import join as pjoin, dirname, split as psplit
import shutil
from tempfile import mkdtemp
from subprocess import call

from nose.tools import assert_true, assert_equal, assert_raises

_downpath, _ = psplit(dirname(__file__))
EXE_PTH = pjoin(_downpath, 'gitwash_dumper.py')
TMPDIR = None

def setup():
    global TMPDIR
    TMPDIR = mkdtemp()


def teardown():
    shutil.rmtree(TMPDIR)


def test_dumper():
    call([EXE_PTH,
          TMPDIR,
          'my_project'])

