diff --git a/tests/test_args.py b/tests/test_args.py index 0f05df6d..13d66d5d 100644 --- a/tests/test_args.py +++ b/tests/test_args.py @@ -21,7 +21,7 @@ "build --force-unknown-architecture": [call(BUILD_MISSING_PKG_ERROR)], "build --force-unknown-architecture zlib --foo": [call('unrecognized arguments: --foo')], "init --docker-image": [call('unrecognized arguments: --docker-image')], - "builda --force-unknown-architecture zlib" : [call("argument action: invalid choice: 'builda' (choose from 'analytics', 'architecture', 'build', 'clean', 'deps', 'doctor', 'init', 'version')")], + "builda --force-unknown-architecture zlib" : [call("argument action: invalid choice: 'builda' (choose from analytics, architecture, build, clean, deps, doctor, init, version)")], "build --force-unknown-architecture zlib --no-system --always-prefer-system" : [call('argument --always-prefer-system: not allowed with argument --no-system')], "build zlib --architecture foo": ARCHITECTURE_ERROR, "build --force-unknown-architecture zlib --remote-store rsync://test1.local/::rw --write-store rsync://test2.local/::rw ": [call('cannot specify ::rw and --write-store at the same time')], @@ -101,6 +101,10 @@ def test_failingParsing(self, mock_print) -> None: mock_print.mock_calls = [] with patch.object(sys, "argv", ["alibuild"] + shlex.split(cmd)): self.assertRaises(FakeExit, doParseArgs) + if mock_print.mock_calls != calls: + import json + print("Expected calls: ", json.dumps(calls, indent=2, default=str)) + print("Actual calls: ", json.dumps(mock_print.mock_calls, indent=2, default=str)) self.assertEqual(mock_print.mock_calls, calls) def test_validArchitectures(self) -> None: