6
6
def tests_command_repr () -> None :
7
7
cmd = Command (["python" , "-m" , "pip" , "list" ])
8
8
assert repr (cmd ) == "Command(args=['python', '-m', 'pip', 'list'])"
9
+ assert cmd .invert_exit_code is False
9
10
assert cmd .ignore_exit_code is False
10
11
11
12
12
13
def tests_command_repr_ignore () -> None :
13
14
cmd = Command (["-" , "python" , "-m" , "pip" , "list" ])
14
15
assert repr (cmd ) == "Command(args=['-', 'python', '-m', 'pip', 'list'])"
16
+ assert cmd .invert_exit_code is False
15
17
assert cmd .ignore_exit_code is True
16
18
17
19
20
+ def tests_command_repr_invert () -> None :
21
+ cmd = Command (["!" , "python" , "-m" , "pip" , "list" ])
22
+ assert repr (cmd ) == "Command(args=['!', 'python', '-m', 'pip', 'list'])"
23
+ assert cmd .invert_exit_code is True
24
+ assert cmd .ignore_exit_code is False
25
+
26
+
18
27
def tests_command_eq () -> None :
19
28
cmd_1 = Command (["python" , "-m" , "pip" , "list" ])
20
29
cmd_2 = Command (["python" , "-m" , "pip" , "list" ])
@@ -24,7 +33,8 @@ def tests_command_eq() -> None:
24
33
def tests_command_ne () -> None :
25
34
cmd_1 = Command (["python" , "-m" , "pip" , "list" ])
26
35
cmd_2 = Command (["-" , "python" , "-m" , "pip" , "list" ])
27
- assert cmd_1 != cmd_2
36
+ cmd_3 = Command (["!" , "python" , "-m" , "pip" , "list" ])
37
+ assert cmd_1 != cmd_2 != cmd_3
28
38
29
39
30
40
def tests_env_list_repr () -> None :
0 commit comments