def _testme(self, argv, expected_output, stdin=None, env=None):
    ' Helper test shortcut '
    with mock_environ((env or {})):
        result = render_command(os.getcwd(), (env or {}), stdin, argv)
    if isinstance(result, bytes):
        result = result.decode('utf-8')
    self.assertEqual(result, expected_output)
Helper test shortcut
def _testme(self, argv, expected_output, stdin=None, env=None):
    '  '
    with mock_environ((env or {})):
        result = render_command(os.getcwd(), (env or {}), stdin, argv)
    if isinstance(result, bytes):
        result = result.decode('utf-8')
    self.assertEqual(result, expected_output)