예제 #1
0
 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)
예제 #2
0
 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
예제 #3
0
 def create_fixer_command(self, files):
     command = ['phpcbf']
     command = self._apply_options(command)
     command += docker.replace_basedir(self.base_path, files)
     return command
예제 #4
0
 def create_fixer_command(self, files):
     command = ['gofmt', '-w']
     command += docker.replace_basedir(self.base_path, files)
     return command
예제 #5
0
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)
예제 #6
0
 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
예제 #7
0
 def create_fixer_command(self, files):
     command = ['phpcbf']
     command = self._apply_options(command)
     command += docker.replace_basedir(self.base_path, files)
     return command
예제 #8
0
 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)