11import subprocess
22import sys
33from pathlib import Path
4- from typing import List
54
65import pytest
76
1312OVERHEAD_LINES = 3 # footnote plus top/bottom of panel
1413
1514
16- def prepare_lines (s : str ) -> List [str ]:
15+ def prepare_lines (s : str ) -> list [str ]:
1716 """
1817 Takes a string and massages it to a list of modified lines.
1918
@@ -27,7 +26,7 @@ def prepare_lines(s: str) -> List[str]:
2726 return [line [2 :].rstrip (". " ) for line in unified .split ("\n " )]
2827
2928
30- def find_in_lines (lines : List [str ], cmd : str , help : str ) -> bool :
29+ def find_in_lines (lines : list [str ], cmd : str , help : str ) -> bool :
3130 """
3231 Looks for a line that starts with 'cmd', and also contains the 'help'.
3332 """
@@ -54,7 +53,7 @@ def find_in_lines(lines: List[str], cmd: str, help: str) -> bool:
5453 pytest .param (["pets" , "list" ], False , id = "pets-list" ),
5554 ],
5655)
57- def test_subcommands_help (args : List [str ], expected : bool ):
56+ def test_subcommands_help (args : list [str ], expected : bool ):
5857 full_args = (
5958 [sys .executable , "-m" , "coverage" , "run" , str (SUBCOMMANDS )] + args + ["--help" ]
6059 )
@@ -193,7 +192,7 @@ def test_subcommands_users_update_tree():
193192 pytest .param (["pets" , "list" ], "Need to compile list of pets" , id = "pets-list" ),
194193 ],
195194)
196- def test_subcommands_execute (args : List [str ], message : str ):
195+ def test_subcommands_execute (args : list [str ], message : str ):
197196 full_args = [sys .executable , "-m" , "coverage" , "run" , str (SUBCOMMANDS )] + args
198197 result = subprocess .run (
199198 full_args ,
0 commit comments