@@ -27,7 +27,10 @@ class AssertRaisesContext(Generic[_E]):
27
27
def __init__ (self , exception : Type [_E ], msg_fmt : Text = ...) -> None : ...
28
28
def __enter__ (self : _S ) -> _S : ...
29
29
def __exit__ (
30
- self , exc_type : Optional [Type [BaseException ]], exc_val : Optional [BaseException ], exc_tb : Optional [TracebackType ]
30
+ self ,
31
+ exc_type : Optional [Type [BaseException ]],
32
+ exc_val : Optional [BaseException ],
33
+ exc_tb : Optional [TracebackType ],
31
34
) -> bool : ...
32
35
def format_message (self , default_msg : Text ) -> Text : ...
33
36
def add_test (self , cb : Callable [[_E ], Any ]) -> None : ...
@@ -36,24 +39,35 @@ class AssertRaisesContext(Generic[_E]):
36
39
37
40
class AssertRaisesErrnoContext (AssertRaisesContext [_E ]):
38
41
expected_errno : int
39
- def __init__ (self , exception : Type [_E ], expected_errno : int , msg_fmt : Text = ...) -> None : ...
42
+ def __init__ (
43
+ self , exception : Type [_E ], expected_errno : int , msg_fmt : Text = ...
44
+ ) -> None : ...
40
45
41
46
class AssertRaisesRegexContext (AssertRaisesContext [_E ]):
42
47
pattern : Text
43
- def __init__ (self , exception : Type [_E ], pattern : Text , msg_fmt : Text = ...) -> None : ...
48
+ def __init__ (
49
+ self , exception : Type [_E ], pattern : Text , msg_fmt : Text = ...
50
+ ) -> None : ...
44
51
45
52
class AssertWarnsContext :
46
- def __init__ (self , warning_class : Type [Warning ], msg_fmt : Text = ...) -> None : ...
53
+ def __init__ (
54
+ self , warning_class : Type [Warning ], msg_fmt : Text = ...
55
+ ) -> None : ...
47
56
def __enter__ (self : _S ) -> _S : ...
48
57
def __exit__ (
49
- self , exc_type : Optional [Type [BaseException ]], exc_val : Optional [BaseException ], exc_tb : Optional [TracebackType ],
58
+ self ,
59
+ exc_type : Optional [Type [BaseException ]],
60
+ exc_val : Optional [BaseException ],
61
+ exc_tb : Optional [TracebackType ],
50
62
) -> None : ...
51
63
def format_message (self ) -> Text : ...
52
64
def add_test (self , cb : Callable [[Warning ], bool ]) -> None : ...
53
65
54
66
class AssertWarnsRegexContext (AssertWarnsContext ):
55
67
pattern : Text
56
- def __init__ (self , warning_class : Type [Warning ], msg_fmt : Text = ...) -> None : ...
68
+ def __init__ (
69
+ self , warning_class : Type [Warning ], msg_fmt : Text = ...
70
+ ) -> None : ...
57
71
58
72
def fail (msg : Text = ...) -> NoReturn : ...
59
73
def assert_true (expr : Any , msg_fmt : Text = ...) -> None : ...
@@ -64,35 +78,93 @@ def assert_is_none(expr: Any, msg_fmt: Text = ...) -> None: ...
64
78
def assert_is_not_none (expr : Any , msg_fmt : Text = ...) -> None : ...
65
79
def assert_equal (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
66
80
def assert_not_equal (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
67
- def assert_almost_equal (first : float , second : float , msg_fmt : Text = ..., places : int = ..., delta : float = ...) -> None : ...
68
- def assert_not_almost_equal (first : float , second : float , msg_fmt : Text = ..., places : int = ..., delta : float = ...) -> None : ...
69
- def assert_dict_equal (first : dict , second : dict , key_msg_fmt : Text = ..., value_msg_fmt : Text = ...) -> None : ...
70
- def assert_dict_superset (first : dict , second : dict , key_msg_fmt : Text = ..., value_msg_fmt : Text = ...) -> None : ...
81
+ def assert_almost_equal (
82
+ first : float ,
83
+ second : float ,
84
+ msg_fmt : Text = ...,
85
+ places : int = ...,
86
+ delta : float = ...,
87
+ ) -> None : ...
88
+ def assert_not_almost_equal (
89
+ first : float ,
90
+ second : float ,
91
+ msg_fmt : Text = ...,
92
+ places : int = ...,
93
+ delta : float = ...,
94
+ ) -> None : ...
95
+ def assert_dict_equal (
96
+ first : dict ,
97
+ second : dict ,
98
+ key_msg_fmt : Text = ...,
99
+ value_msg_fmt : Text = ...,
100
+ ) -> None : ...
101
+ def assert_dict_superset (
102
+ first : dict ,
103
+ second : dict ,
104
+ key_msg_fmt : Text = ...,
105
+ value_msg_fmt : Text = ...,
106
+ ) -> None : ...
71
107
def assert_less (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
72
- def assert_less_equal (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
108
+ def assert_less_equal (
109
+ first : Any , second : Any , msg_fmt : Text = ...
110
+ ) -> None : ...
73
111
def assert_greater (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
74
- def assert_greater_equal (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
75
- def assert_regex (text : Text , regex : Union [Text , Pattern [Text ]], msg_fmt : Text = ...) -> None : ...
112
+ def assert_greater_equal (
113
+ first : Any , second : Any , msg_fmt : Text = ...
114
+ ) -> None : ...
115
+ def assert_regex (
116
+ text : Text , regex : Union [Text , Pattern [Text ]], msg_fmt : Text = ...
117
+ ) -> None : ...
76
118
def assert_is (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
77
119
def assert_is_not (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
78
- def assert_in (first : Any , second : Container [Any ], msg_fmt : Text = ...) -> None : ...
79
- def assert_not_in (first : Any , second : Container [Any ], msg_fmt : Text = ...) -> None : ...
80
- def assert_between (lower_bound : Any , upper_bound : Any , expr : Any , msg_fmt : Text = ...) -> None : ...
81
- def assert_is_instance (obj : Any , cls : Union [type , Tuple [type , ...]], msg_fmt : Text = ...) -> None : ...
82
- def assert_not_is_instance (obj : Any , cls : Union [type , Tuple [type , ...]], msg_fmt : Text = ...) -> None : ...
83
- def assert_count_equal (sequence1 : Iterable [Any ], sequence2 : Iterable [Any ], msg_fmt : Text = ...) -> None : ...
120
+ def assert_in (
121
+ first : Any , second : Container [Any ], msg_fmt : Text = ...
122
+ ) -> None : ...
123
+ def assert_not_in (
124
+ first : Any , second : Container [Any ], msg_fmt : Text = ...
125
+ ) -> None : ...
126
+ def assert_between (
127
+ lower_bound : Any , upper_bound : Any , expr : Any , msg_fmt : Text = ...
128
+ ) -> None : ...
129
+ def assert_is_instance (
130
+ obj : Any , cls : Union [type , Tuple [type , ...]], msg_fmt : Text = ...
131
+ ) -> None : ...
132
+ def assert_not_is_instance (
133
+ obj : Any , cls : Union [type , Tuple [type , ...]], msg_fmt : Text = ...
134
+ ) -> None : ...
135
+ def assert_count_equal (
136
+ sequence1 : Iterable [Any ], sequence2 : Iterable [Any ], msg_fmt : Text = ...
137
+ ) -> None : ...
84
138
def assert_has_attr (obj : Any , attribute : str , msg_fmt : Text = ...) -> None : ...
85
- def assert_datetime_about_now (actual : Optional [datetime .datetime ], msg_fmt : Text = ...) -> None : ...
86
- def assert_datetime_about_now_utc (actual : Optional [datetime .datetime ], msg_fmt : Text = ...) -> None : ...
87
- def assert_raises (exception : Type [BaseException ], msg_fmt : Text = ...) -> AssertRaisesContext : ...
139
+ def assert_datetime_about_now (
140
+ actual : Optional [datetime .datetime ], msg_fmt : Text = ...
141
+ ) -> None : ...
142
+ def assert_datetime_about_now_utc (
143
+ actual : Optional [datetime .datetime ], msg_fmt : Text = ...
144
+ ) -> None : ...
145
+ def assert_raises (
146
+ exception : Type [BaseException ], msg_fmt : Text = ...
147
+ ) -> AssertRaisesContext : ...
88
148
def assert_raises_regex (
89
- exception : Type [BaseException ], regex : Union [Text , Pattern [Text ]], msg_fmt : Text = ...
149
+ exception : Type [BaseException ],
150
+ regex : Union [Text , Pattern [Text ]],
151
+ msg_fmt : Text = ...,
152
+ ) -> AssertRaisesContext : ...
153
+ def assert_raises_errno (
154
+ exception : Type [BaseException ], errno : int , msg_fmt : Text = ...
90
155
) -> AssertRaisesContext : ...
91
- def assert_raises_errno (exception : Type [BaseException ], errno : int , msg_fmt : Text = ...) -> AssertRaisesContext : ...
92
- def assert_succeeds (exception : Type [BaseException ], msg_fmt : Text = ...) -> ContextManager : ...
93
- def assert_warns (warning_type : Type [Warning ], msg_fmt : Text = ...) -> AssertWarnsContext : ...
94
- def assert_warns_regex (warning_type : Type [Warning ], regex : Text , msg_fmt : Text = ...) -> AssertWarnsContext : ...
95
- def assert_json_subset (first : Union [dict , list ], second : Union [dict , list , str , bytes ]) -> None : ...
156
+ def assert_succeeds (
157
+ exception : Type [BaseException ], msg_fmt : Text = ...
158
+ ) -> ContextManager : ...
159
+ def assert_warns (
160
+ warning_type : Type [Warning ], msg_fmt : Text = ...
161
+ ) -> AssertWarnsContext : ...
162
+ def assert_warns_regex (
163
+ warning_type : Type [Warning ], regex : Text , msg_fmt : Text = ...
164
+ ) -> AssertWarnsContext : ...
165
+ def assert_json_subset (
166
+ first : Union [dict , list ], second : Union [dict , list , str , bytes ]
167
+ ) -> None : ...
96
168
97
169
class Exists :
98
170
member_name : str
0 commit comments