Skip to content

Commit 5e1b3cb

Browse files
committed
test_container_no_clitool_given: Simplify.
1 parent 052ed22 commit 5e1b3cb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/test_unit_get_build_command.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
import os
66
import unittest
77
from unittest.mock import patch
8+
89
# pylint: disable=import-error
9-
from doc_builder.build_commands import get_build_command, get_mount_arg
10+
from doc_builder.build_commands import get_build_command, get_mount_arg, get_container_cli_tool
1011

1112
# Allow names that pylint doesn't like, because otherwise I find it hard
1213
# to make readable unit test names
@@ -224,9 +225,7 @@ def test_container_no_clitool_given(self, mock_get_toplevel_of_doc_builder_paren
224225
"html",
225226
]
226227
print("build_command: +", " ".join(build_command))
227-
self.assertTrue(
228-
build_command in [["podman"] + expected, build_command == ["docker"] + expected]
229-
)
228+
self.assertEqual(build_command, [get_container_cli_tool()] + expected)
230229

231230
@patch("doc_builder.sys_utils.get_toplevel_of_doc_builder_parent")
232231
def test_container_builddir_not_in_db_checkout(self, mock_get_toplevel_of_doc_builder_parent):

0 commit comments

Comments
 (0)