Beispiel #1
0
 def test_split_command_with_unicode(self):
     if six.PY2:
         self.assertEqual(
             split_command(unicode('echo μμ', 'utf-8')),
             ['echo', 'μμ']
         )
     else:
         self.assertEqual(split_command('echo μμ'), ['echo', 'μμ'])
Beispiel #2
0
 def test_split_command_with_unicode(self):
     if six.PY2:
         self.assertEqual(
             split_command(unicode('echo μμ', 'utf-8')),
             ['echo', 'μμ']
         )
     else:
         self.assertEqual(split_command('echo μμ'), ['echo', 'μμ'])
Beispiel #3
0
def set_command_and_args(config, entrypoint, command):
    if isinstance(entrypoint, six.string_types):
        entrypoint = split_command(entrypoint)
    if isinstance(command, six.string_types):
        command = split_command(command)

    if entrypoint:
        config['Command'] = entrypoint + command
        return

    if command:
        config['Args'] = command
Beispiel #4
0
def set_command_and_args(config, entrypoint, command):
    if isinstance(entrypoint, six.string_types):
        entrypoint = split_command(entrypoint)
    if isinstance(command, six.string_types):
        command = split_command(command)

    if entrypoint:
        config['Command'] = entrypoint + command
        return

    if command:
        config['Args'] = command
Beispiel #5
0
 def test_split_command_with_bytes(self):
     self.assertEqual(split_command('echo μμ'), ['echo', 'μμ'])
Beispiel #6
0
 def test_split_command_with_unicode(self):
     self.assertEqual(split_command(u'echo μμ'), ['echo', 'μμ'])
Beispiel #7
0
 def test_split_command_with_bytes(self):
     expected = ['echo', u'μ'.encode('utf-8')]
     self.assertEqual(split_command(u'echo μ'), expected)
Beispiel #8
0
 def test_split_command_with_bytes(self):
     self.assertEqual(split_command('echo μμ'), ['echo', 'μμ'])
Beispiel #9
0
 def test_split_command_with_bytes(self):
     expected = ['echo', u'μ'.encode('utf-8')]
     self.assertEqual(split_command(u'echo μ'), expected)
Beispiel #10
0
 def test_split_command_with_bytes(self):
     self.assertEqual(split_command("echo μμ"), ["echo", "μμ"])
Beispiel #11
0
 def test_split_command_with_unicode(self):
     if six.PY2:
         self.assertEqual(split_command(unicode("echo μμ", "utf-8")), ["echo", "μμ"])
     else:
         self.assertEqual(split_command("echo μμ"), ["echo", "μμ"])
Beispiel #12
0
 def test_split_command_with_bytes(self):
     assert split_command('echo μμ') == ['echo', 'μμ']
Beispiel #13
0
 def test_split_command_with_unicode(self):
     assert split_command(u'echo μμ') == ['echo', 'μμ']
Beispiel #14
0
 def test_split_command_with_unicode(self):
     assert split_command(u'echo μμ') == ['echo', 'μμ']
Beispiel #15
0
 def test_split_command_with_unicode(self):
     self.assertEqual(split_command(u'echo μμ'), ['echo', 'μμ'])
Beispiel #16
0
 def test_split_command_with_bytes(self):
     assert split_command('echo μμ') == ['echo', 'μμ']
Beispiel #17
0
    def __init__(self, *args, **kwargs) -> None:
        super().__init__(*args, **kwargs)

        if 'Command' in self and isinstance(self['Command'], str):
            self.update({'Command': split_command(self['Command'])})