@@ -22,6 +22,7 @@ class Cmd:
2222 default_platform = "-64"
2323
2424 def __init__ (self , platform = None ):
25+ self .scratch = {}
2526 if platform :
2627 self .default_platform = platform
2728
@@ -81,19 +82,19 @@ def check_warm64(self, cmd, tag, name):
8182
8283
8384def test_write_alias_tag_with_platform (alias_checker ):
84- alias_checker .check_32 (alias_checker .Cmd , "1.0-32" , "testA" )
85- alias_checker .check_w32 (alias_checker .Cmd , "1.0-32" , "testB" )
86- alias_checker .check_64 (alias_checker .Cmd , "1.0-64" , "testC" )
87- alias_checker .check_w64 (alias_checker .Cmd , "1.0-64" , "testD" )
88- alias_checker .check_arm64 (alias_checker .Cmd , "1.0-arm64" , "testE" )
89- alias_checker .check_warm64 (alias_checker .Cmd , "1.0-arm64" , "testF" )
85+ alias_checker .check_32 (alias_checker .Cmd () , "1.0-32" , "testA" )
86+ alias_checker .check_w32 (alias_checker .Cmd () , "1.0-32" , "testB" )
87+ alias_checker .check_64 (alias_checker .Cmd () , "1.0-64" , "testC" )
88+ alias_checker .check_w64 (alias_checker .Cmd () , "1.0-64" , "testD" )
89+ alias_checker .check_arm64 (alias_checker .Cmd () , "1.0-arm64" , "testE" )
90+ alias_checker .check_warm64 (alias_checker .Cmd () , "1.0-arm64" , "testF" )
9091
9192
9293def test_write_alias_default_platform (alias_checker ):
9394 alias_checker .check_32 (alias_checker .Cmd ("-32" ), "1.0" , "testA" )
9495 alias_checker .check_w32 (alias_checker .Cmd ("-32" ), "1.0" , "testB" )
95- alias_checker .check_64 (alias_checker .Cmd , "1.0" , "testC" )
96- alias_checker .check_w64 (alias_checker .Cmd , "1.0" , "testD" )
96+ alias_checker .check_64 (alias_checker .Cmd () , "1.0" , "testC" )
97+ alias_checker .check_w64 (alias_checker .Cmd () , "1.0" , "testD" )
9798 alias_checker .check_arm64 (alias_checker .Cmd ("-arm64" ), "1.0" , "testE" )
9899 alias_checker .check_warm64 (alias_checker .Cmd ("-arm64" ), "1.0" , "testF" )
99100
@@ -110,6 +111,7 @@ def test_write_alias_default(alias_checker, monkeypatch, tmp_path, default):
110111 class Cmd :
111112 global_dir = Path (tmp_path ) / "bin"
112113 launcher_exe = None
114+ scratch = {}
113115 def get_installs (self ):
114116 return [
115117 {
@@ -146,6 +148,7 @@ def write_alias(*a):
146148
147149def test_print_cli_shortcuts (patched_installs , assert_log , monkeypatch , tmp_path ):
148150 class Cmd :
151+ scratch = {}
149152 global_dir = Path (tmp_path )
150153 def get_installs (self ):
151154 return installs .get_installs (None )
@@ -163,6 +166,7 @@ def get_installs(self):
163166
164167def test_print_path_warning (patched_installs , assert_log , tmp_path ):
165168 class Cmd :
169+ scratch = {}
166170 global_dir = Path (tmp_path )
167171 def get_installs (self ):
168172 return installs .get_installs (None )
0 commit comments