Skip to content

Commit

Permalink
Add comment to workaround Python2 SyntaxError
Browse files Browse the repository at this point in the history
Commented out code is the proper scenario but cannot be used as the test
file is run under Python2
  • Loading branch information
bxsx committed May 21, 2021
1 parent bc85fec commit 1f66fd9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rollbar/test/test_rollbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 1f66fd9

Please sign in to comment.