Пример #1
0
    def setUp(self):
        super(TestDebianOS, self).setUp()

        # os.sep used within fake os.
        self._fakeOs.osSep = "/"

        main.PathRegEx._cleanPathRegExCompiled, main.PathRegEx._regExCompiled = main.getRegExCompiled()

        # Set the return value os separator choice.
        self._pathStr = PathStr
        self._pathStr.osSep = "/"
Пример #2
0
    def setUp(self):
        super(TestWindowsOS, self).setUp()

        self.pathJoinPatcher = patch("pathGenerator.main.os.path.join", side_effect=self._fakeOs.pathJoin)
        self.mock_fakeDir = self.pathJoinPatcher.start()

        # os.sep used within fake os.
        self._fakeOs.osSep = "\\"

        main.PathRegEx._cleanPathRegExCompiled, main.PathRegEx._regExCompiled = main.getRegExCompiled()

        # Set the return value os separator choice.
        self._pathStr = PathStr
        self._pathStr.osSep = "\\"