def test_replace_basedir(self): files = ['/tmp/things/some/thing.py', 'some/other.py'] out = docker.replace_basedir('/tmp/things', files) expected = ['/src/some/thing.py', '/src/some/other.py'] self.assertEqual(expected, out)
def create_command(self, files): command = ['phpcs'] command += ['--report=checkstyle'] command = self._apply_options(command) command += docker.replace_basedir(self.base_path, files) return command
def create_fixer_command(self, files): command = ['phpcbf'] command = self._apply_options(command) command += docker.replace_basedir(self.base_path, files) return command
def create_fixer_command(self, files): command = ['gofmt', '-w'] command += docker.replace_basedir(self.base_path, files) return command
def test_replace_basedir(): files = ['/tmp/things/some/thing.py', 'some/other.py'] out = docker.replace_basedir('/tmp/things', files) expected = ['/src/some/thing.py', '/src/some/other.py'] eq_(expected, out)