Esempio n. 1
0
    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)
Esempio n. 2
0
    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)
Esempio n. 3
0
    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())
Esempio n. 4
0
    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())