From 1f66fd943f738eb1f98c317ec6ac4109c757301f Mon Sep 17 00:00:00 2001 From: Bart Skowron Date: Fri, 21 May 2021 23:53:13 +0200 Subject: [PATCH] Add comment to workaround Python2 SyntaxError Commented out code is the proper scenario but cannot be used as the test file is run under Python2 --- rollbar/test/test_rollbar.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rollbar/test/test_rollbar.py b/rollbar/test/test_rollbar.py index fc5fd18b..a188ecb1 100644 --- a/rollbar/test/test_rollbar.py +++ b/rollbar/test/test_rollbar.py @@ -396,6 +396,8 @@ def test_get_request_fastapi_middleware(self): # Inject annotations and decorate endpoint dynamically # to avoid SyntaxError for older Python # + # This is the code we'd use if we had not loaded the test file on Python 2. + # # @app.get('/{param}') # def root(param, fastapi_request: Request): # current_request = rollbar.get_request() @@ -431,6 +433,8 @@ def test_get_request_fastapi_logger(self): # Inject annotations and decorate endpoint dynamically # to avoid SyntaxError for older Python # + # This is the code we'd use if we had not loaded the test file on Python 2. + # # @app.get('/{param}') # def root(fastapi_request: Request): # current_request = rollbar.get_request() @@ -470,6 +474,8 @@ def test_get_request_fastapi_router(self): # Inject annotations and decorate endpoint dynamically # to avoid SyntaxError for older Python # + # This is the code we'd use if we had not loaded the test file on Python 2. + # # @app.get('/{param}') # def root(fastapi_request: Request): # current_request = rollbar.get_request()