示例#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', 'μμ'])
示例#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', 'μμ'])
示例#3
0
文件: bundle.py 项目: brightoneqq/CI
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
示例#4
0
文件: bundle.py 项目: GM-Alex/compose
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
示例#5
0
 def test_split_command_with_bytes(self):
     self.assertEqual(split_command('echo μμ'), ['echo', 'μμ'])
示例#6
0
 def test_split_command_with_unicode(self):
     self.assertEqual(split_command(u'echo μμ'), ['echo', 'μμ'])
示例#7
0
 def test_split_command_with_bytes(self):
     expected = ['echo', u'μ'.encode('utf-8')]
     self.assertEqual(split_command(u'echo μ'), expected)
示例#8
0
 def test_split_command_with_bytes(self):
     self.assertEqual(split_command('echo μμ'), ['echo', 'μμ'])
示例#9
0
 def test_split_command_with_bytes(self):
     expected = ['echo', u'μ'.encode('utf-8')]
     self.assertEqual(split_command(u'echo μ'), expected)
示例#10
0
 def test_split_command_with_bytes(self):
     self.assertEqual(split_command("echo μμ"), ["echo", "μμ"])
示例#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", "μμ"])
示例#12
0
 def test_split_command_with_bytes(self):
     assert split_command('echo μμ') == ['echo', 'μμ']
示例#13
0
 def test_split_command_with_unicode(self):
     assert split_command(u'echo μμ') == ['echo', 'μμ']
示例#14
0
 def test_split_command_with_unicode(self):
     assert split_command(u'echo μμ') == ['echo', 'μμ']
示例#15
0
 def test_split_command_with_unicode(self):
     self.assertEqual(split_command(u'echo μμ'), ['echo', 'μμ'])
示例#16
0
 def test_split_command_with_bytes(self):
     assert split_command('echo μμ') == ['echo', 'μμ']
示例#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'])})