We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f54b5a5 commit 32bb2a4Copy full SHA for 32bb2a4
tests/test_rest.py
@@ -1,3 +1,4 @@
1
+import warnings
2
import alpaca_trade_api as tradeapi
3
from alpaca_trade_api.rest import APIError
4
@@ -1172,7 +1173,7 @@ def callback_429(request, context):
1172
1173
1174
1175
def test_no_resource_warning_with_context_manager():
- with pytest.warns(None) as record: # ensure no warnings are raised
1176
- with tradeapi.REST('key-id', 'secret-key', api_version='v1') as api:
+ with warnings.catch_warnings(): # ensure no warnings are raised
1177
+ warnings.simplefilter("error")
1178
+ with tradeapi.REST("key-id", "secret-key", api_version="v1") as api:
1179
assert api
- assert not record
0 commit comments