def test_directory_change(self): assert_equal(os.getcwd(), self.original_dir) with working_directory(self.tempdir.path): assert_equal(os.getcwd(), self.tempdir.path) assert_equal(os.getcwd(), self.original_dir)
def test_default_directory(self): a = GenericInputFileArgParser(self._abc_path, False) args = '-d -p'.format(self.tempdir.path).split() with working_directory(self.tempdir.path): a.main(argv=args) assert_equal(self.tempdir.read(('out.zebra'), 'utf-8').splitlines(), textwrap.dedent("""\ a1.py a2.py""").splitlines())