summaryrefslogtreecommitdiff
path: root/test/units
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2023-02-17 18:02:20 -0800
committerGitHub <noreply@github.com>2023-02-17 18:02:20 -0800
commit72c59cfd9862c5ec4f7452bff6aaf17f35d3db79 (patch)
treef856f05b233f3658452b1df890322317976fd8d3 /test/units
parent21fc699b7734536d94e0b2d3f2f87f704444959b (diff)
downloadansible-72c59cfd9862c5ec4f7452bff6aaf17f35d3db79.tar.gz
Avoid trailing spaces in unit test (#80033)
Diffstat (limited to 'test/units')
-rw-r--r--test/units/executor/module_common/test_module_common.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/units/executor/module_common/test_module_common.py b/test/units/executor/module_common/test_module_common.py
index 390dc90135..6e2a4956c4 100644
--- a/test/units/executor/module_common/test_module_common.py
+++ b/test/units/executor/module_common/test_module_common.py
@@ -43,15 +43,16 @@ class TestStripComments:
assert amc._strip_comments(all_comments) == u""
def test_all_whitespace(self):
- # Note: Do not remove the spaces on the blank lines below. They're
- # test data to show that the lines get removed despite having spaces
- # on them
- all_whitespace = u"""
-
-
-
-\t\t\r\n
- """ # nopep8
+ all_whitespace = (
+ '\n'
+ ' \n'
+ '\n'
+ ' \n'
+ '\t\t\r\n'
+ '\n'
+ ' '
+ )
+
assert amc._strip_comments(all_whitespace) == u""
def test_somewhat_normal(self):