Skip to content

Commit

Permalink
Tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
singiamtel committed Dec 13, 2024
1 parent fe785bd commit cd0d961
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')],
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit cd0d961

Please sign in to comment.