@@ -3,68 +3,68 @@ import datetime
33from types import TracebackType
44from typing import \
55 Any , Container , Type , Callable , Tuple , Union , ContextManager , \
6- Pattern , Optional , Iterable
6+ Pattern , Optional , Iterable , Text
77
88class AssertRaisesContext :
99 exception : Type [BaseException ]
10- msg_fmt : str
11- def __init__ (self , exception : Type [BaseException ], msg_fmt : str = ...) -> None : ...
10+ msg_fmt : Text
11+ def __init__ (self , exception : Type [BaseException ], msg_fmt : Text = ...) -> None : ...
1212 def __enter__ (self ) -> AssertRaisesContext : ...
1313 def __exit__ (self , exc_type : Optional [Type [BaseException ]],
1414 exc_val : Optional [BaseException ],
1515 exc_tb : Optional [TracebackType ]) -> Optional [bool ]: ...
16- def format_message (self , default_msg : str ) -> str : ...
16+ def format_message (self , default_msg : Text ) -> Text : ...
1717 def add_test (self , cb : Callable [[BaseException ], None ]) -> None : ...
1818
1919class AssertRaisesErrnoContext (AssertRaisesContext ):
2020 expected_errno : int
21- def __init__ (self , exception : Type [BaseException ], expected_errno : int , msg_fmt : str = ...) -> None : ...
21+ def __init__ (self , exception : Type [BaseException ], expected_errno : int , msg_fmt : Text = ...) -> None : ...
2222
2323class AssertRaisesRegexContext (AssertRaisesContext ):
24- pattern : str
25- def __init__ (self , exception : Type [BaseException ], pattern : str , msg_fmt : str = ...) -> None : ...
24+ pattern : Text
25+ def __init__ (self , exception : Type [BaseException ], pattern : Text , msg_fmt : Text = ...) -> None : ...
2626
2727class AssertWarnsContext :
28- def __init__ (self , warning_class : Type [Warning ], msg_fmt : str = ...) -> None : ...
28+ def __init__ (self , warning_class : Type [Warning ], msg_fmt : Text = ...) -> None : ...
2929 def __enter__ (self ) -> None : ...
3030 def __exit__ (self , exc_type : Type [BaseException ], exc_val : BaseException , exc_tb : Any ) -> None : ...
31- def format_message (self ) -> str : ...
31+ def format_message (self ) -> Text : ...
3232 def add_test (self , cb : Callable [[Warning ], None ]) -> None : ...
3333
3434class AssertWarnsRegexContext (AssertWarnsContext ):
35- pattern : str
36- def __init__ (self , warning_class : Type [Warning ], msg_fmt : str = ...) -> None : ...
35+ pattern : Text
36+ def __init__ (self , warning_class : Type [Warning ], msg_fmt : Text = ...) -> None : ...
3737
38- def fail (msg : str = ...) -> None : ...
39- def assert_true (expr : Any , msg_fmt : str = ...) -> None : ...
40- def assert_false (expr : Any , msg_fmt : str = ...) -> None : ...
41- def assert_boolean_true (expr : Any , msg_fmt : str = ...) -> None : ...
42- def assert_boolean_false (expr : Any , msg_fmt : str = ...) -> None : ...
43- def assert_is_none (expr : Any , msg_fmt : str = ...) -> None : ...
44- def assert_is_not_none (expr : Any , msg_fmt : str = ...) -> None : ...
45- def assert_equal (first : Any , second : Any , msg_fmt : str = ...) -> None : ...
46- def assert_not_equal (first : Any , second : Any , msg_fmt : str = ...) -> None : ...
47- def assert_almost_equal (first : float , second : float , msg_fmt : str = ..., places : int = ..., delta : float = ...) -> None : ...
48- def assert_not_almost_equal (first : float , second : float , msg_fmt : str = ..., places : int = ..., delta : float = ...) -> None : ...
49- def assert_less (first : Any , second : Any , msg_fmt : str = ...) -> None : ...
50- def assert_less_equal (first : Any , second : Any , msg_fmt : str = ...) -> None : ...
51- def assert_greater (first : Any , second : Any , msg_fmt : str = ...) -> None : ...
52- def assert_greater_equal (first : Any , second : Any , msg_fmt : str = ...) -> None : ...
53- def assert_regex (text : str , regex : Union [str , Pattern [str ]], msg_fmt : str = ...) -> None : ...
54- def assert_is (first : Any , second : Any , msg_fmt : str = ...) -> None : ...
55- def assert_is_not (first : Any , second : Any , msg_fmt : str = ...) -> None : ...
56- def assert_in (first : Any , second : Container [Any ], msg_fmt : str = ...) -> None : ...
57- def assert_not_in (first : Any , second : Container [Any ], msg_fmt : str = ...) -> None : ...
58- def assert_between (lower_bound : Any , upper_bound : Any , expr : Any , msg_fmt : str = ...) -> None : ...
59- def assert_is_instance (obj : Any , cls : Union [type , Tuple [type , ...]], msg_fmt : str = ...) -> None : ...
60- def assert_not_is_instance (obj : Any , cls : Union [type , Tuple [type , ...]], msg_fmt : str = ...) -> None : ...
61- def assert_count_equal (sequence1 : Iterable [Any ], sequence2 : Iterable [Any ], msg_fmt : str = ...) -> None : ...
62- def assert_has_attr (obj : Any , attribute : str , msg_fmt : str = ...) -> None : ...
63- def assert_datetime_about_now (actual : Optional [datetime .datetime ], msg_fmt : str = ...) -> None : ...
64- def assert_datetime_about_now_utc (actual : Optional [datetime .datetime ], msg_fmt : str = ...) -> None : ...
65- def assert_raises (exception : Type [BaseException ], msg_fmt : str = ...) -> AssertRaisesContext : ...
66- def assert_raises_regex (exception : Type [BaseException ], regex : Union [str , Pattern [str ]], msg_fmt : str = ...) -> AssertRaisesContext : ...
67- def assert_raises_errno (exception : Type [BaseException ], errno : int , msg_fmt : str = ...) -> AssertRaisesContext : ...
68- def assert_succeeds (exception : Type [BaseException ], msg_fmt : str = ...) -> ContextManager : ...
69- def assert_warns (warning_type : Type [Warning ], msg_fmt : str = ...) -> AssertWarnsContext : ...
70- def assert_warns_regex (warning_type : Type [Warning ], regex : str , msg_fmt : str = ...) -> AssertWarnsContext : ...
38+ def fail (msg : Text = ...) -> None : ...
39+ def assert_true (expr : Any , msg_fmt : Text = ...) -> None : ...
40+ def assert_false (expr : Any , msg_fmt : Text = ...) -> None : ...
41+ def assert_boolean_true (expr : Any , msg_fmt : Text = ...) -> None : ...
42+ def assert_boolean_false (expr : Any , msg_fmt : Text = ...) -> None : ...
43+ def assert_is_none (expr : Any , msg_fmt : Text = ...) -> None : ...
44+ def assert_is_not_none (expr : Any , msg_fmt : Text = ...) -> None : ...
45+ def assert_equal (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
46+ def assert_not_equal (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
47+ def assert_almost_equal (first : float , second : float , msg_fmt : Text = ..., places : int = ..., delta : float = ...) -> None : ...
48+ def assert_not_almost_equal (first : float , second : float , msg_fmt : Text = ..., places : int = ..., delta : float = ...) -> None : ...
49+ def assert_less (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
50+ def assert_less_equal (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
51+ def assert_greater (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
52+ def assert_greater_equal (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
53+ def assert_regex (text : Text , regex : Union [Text , Pattern [Text ]], msg_fmt : Text = ...) -> None : ...
54+ def assert_is (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
55+ def assert_is_not (first : Any , second : Any , msg_fmt : Text = ...) -> None : ...
56+ def assert_in (first : Any , second : Container [Any ], msg_fmt : Text = ...) -> None : ...
57+ def assert_not_in (first : Any , second : Container [Any ], msg_fmt : Text = ...) -> None : ...
58+ def assert_between (lower_bound : Any , upper_bound : Any , expr : Any , msg_fmt : Text = ...) -> None : ...
59+ def assert_is_instance (obj : Any , cls : Union [type , Tuple [type , ...]], msg_fmt : Text = ...) -> None : ...
60+ def assert_not_is_instance (obj : Any , cls : Union [type , Tuple [type , ...]], msg_fmt : Text = ...) -> None : ...
61+ def assert_count_equal (sequence1 : Iterable [Any ], sequence2 : Iterable [Any ], msg_fmt : Text = ...) -> None : ...
62+ def assert_has_attr (obj : Any , attribute : str , msg_fmt : Text = ...) -> None : ...
63+ def assert_datetime_about_now (actual : Optional [datetime .datetime ], msg_fmt : Text = ...) -> None : ...
64+ def assert_datetime_about_now_utc (actual : Optional [datetime .datetime ], msg_fmt : Text = ...) -> None : ...
65+ def assert_raises (exception : Type [BaseException ], msg_fmt : Text = ...) -> AssertRaisesContext : ...
66+ def assert_raises_regex (exception : Type [BaseException ], regex : Union [Text , Pattern [Text ]], msg_fmt : Text = ...) -> AssertRaisesContext : ...
67+ def assert_raises_errno (exception : Type [BaseException ], errno : int , msg_fmt : Text = ...) -> AssertRaisesContext : ...
68+ def assert_succeeds (exception : Type [BaseException ], msg_fmt : Text = ...) -> ContextManager : ...
69+ def assert_warns (warning_type : Type [Warning ], msg_fmt : Text = ...) -> AssertWarnsContext : ...
70+ def assert_warns_regex (warning_type : Type [Warning ], regex : Text , msg_fmt : Text = ...) -> AssertWarnsContext : ...
0 commit comments