@@ -123,59 +123,63 @@ def test_async_safe_signal_manager():
123123
124124def test_install_signal_handlers ():
125125 """Test the install_signal_handlers() function."""
126- install_signal_handlers ()
127- install_signal_handlers ()
128- install_signal_handlers ()
126+ with pytest .deprecated_call ():
127+ install_signal_handlers ()
128+ install_signal_handlers ()
129+ install_signal_handlers ()
129130
130131
131132def test_on_sigint ():
132133 """Test the on_sigint() function."""
133- # None is acceptable
134- on_sigint (None )
134+ with pytest .deprecated_call ():
135+ # None is acceptable
136+ on_sigint (None )
135137
136- def mock_sigint_handler ():
137- pass
138+ def mock_sigint_handler ():
139+ pass
138140
139- on_sigint (mock_sigint_handler )
141+ on_sigint (mock_sigint_handler )
140142
141- # Non-callable is not
142- with pytest .raises (ValueError ):
143- on_sigint ('non-callable' )
143+ # Non-callable is not
144+ with pytest .raises (ValueError ):
145+ on_sigint ('non-callable' )
144146
145- # TODO(jacobperron): implement a functional test by using subprocess.Popen
147+ # TODO(jacobperron): implement a functional test by using subprocess.Popen
146148
147149
148150@pytest .mark .skipif (platform .system () == 'Windows' ,
149151 reason = 'No SIGQUIT on Windows' )
150152def test_on_sigquit ():
151153 """Test the on_sigquit() function."""
152- # None is acceptable
153- on_sigquit (None )
154+ with pytest .deprecated_call ():
155+ # None is acceptable
156+ on_sigquit (None )
154157
155- def mock_sigquit_handler ():
156- pass
158+ def mock_sigquit_handler ():
159+ pass
157160
158- on_sigquit (mock_sigquit_handler )
161+ on_sigquit (mock_sigquit_handler )
159162
160- # Non-callable is not
161- with pytest .raises (ValueError ):
162- on_sigquit ('non-callable' )
163+ # Non-callable is not
164+ with pytest .raises (ValueError ):
165+ on_sigquit ('non-callable' )
163166
164- # TODO(jacobperron): implement a functional test by using subprocess.Popen
167+ # TODO(jacobperron): implement a functional test by using subprocess.Popen
165168
166169
167170def test_on_sigterm ():
168171 """Test the on_sigterm() function."""
169- # None is acceptable
170- on_sigterm (None )
172+ with pytest .deprecated_call ():
173+ # None is acceptable
174+ on_sigterm (None )
171175
172- def mock_sigterm_handler ():
173- pass
176+ def mock_sigterm_handler ():
177+ pass
174178
175- on_sigterm (mock_sigterm_handler )
179+ on_sigterm (mock_sigterm_handler )
176180
177- # Non-callable is not
178- with pytest .raises (ValueError ):
179- on_sigterm ('non-callable' )
181+ # Non-callable is not
182+ with pytest .raises (ValueError ):
183+ on_sigterm ('non-callable' )
180184
181- # TODO(jacobperron): implement a functional test by using subprocess.Popen
185+ # TODO(jacobperron): implement a functional test by using subprocess.Popen
0 commit comments