mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-15 19:42:06 +00:00
* Address cyclic-import. * Address redefined-builtin. * Address redefined-argument-from-local. * Address many redefined-outer-name. * Address pointless-string-statement. * No longer needed due to separate bugfix. * Address useless-return. * Address possibly-used-before-assignment. * Add TODOs. * Address super-init-not-called. * Address function-redefined. * Address unspecified-encoding. * Clean up more imports.
28 lines
703 B
Python
28 lines
703 B
Python
# Copyright 2024 Felix Fontein <felix@fontein.de>
|
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
from __future__ import absolute_import, division, print_function
|
|
|
|
|
|
__metaclass__ = type
|
|
|
|
import pytest
|
|
from ansible_collections.community.docker.plugins.modules.docker_image_build import (
|
|
_quote_csv,
|
|
)
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"value, expected",
|
|
[
|
|
("", ""),
|
|
(" ", '" "'),
|
|
(",", '","'),
|
|
('"', '""""'),
|
|
('\rhello, "hi" !\n', '"\rhello, ""hi"" !\n"'),
|
|
],
|
|
)
|
|
def test__quote_csv(value, expected):
|
|
assert _quote_csv(value) == expected
|