def test_is_task_kind_supported_other_kind(self): cmd = [ 'sh', '-c', 'test $0 = capabilities && ' 'echo -n {\\"runnables\\": [\\"otherkind\\"]}' ] self.assertFalse( Runnable.is_kind_supported_by_runner_command(self.kind, cmd))
def test_is_task_kind_supported(self): cmd = [ "sh", "-c", 'test $0 = capabilities && echo -n {\\"runnables\\": [\\"mykind\\"]}', ] self.assertTrue(Runnable.is_kind_supported_by_runner_command(self.kind, cmd))
def test_is_task_kind_supported_no_output(self): cmd = ['sh', '-c', 'echo -n ""'] self.assertFalse( Runnable.is_kind_supported_by_runner_command(self.kind, cmd))