Consider removing the commented out code block
122 # response = client.post("/user", json={"username": "test_invalid_emails", "email": "[email protected]"})
123 # assert response.status_code == 422
124
125 # response = client.post("/user", json={"username": "test_invalid_emails", "email": "texmex'@gmail.com"})126 # assert response.status_code == 422
127
128 response = client.post(
Consider removing the commented out code block
119 )
120 assert response.status_code == 422
121
122 # response = client.post("/user", json={"username": "test_invalid_emails", "email": "[email protected]"})123 # assert response.status_code == 422
124
125 # response = client.post("/user", json={"username": "test_invalid_emails", "email": "texmex'@gmail.com"})
Consider removing the commented out code block
19 client = TestClient(app)
20 yield client
21 delete_db_and_tables()
22 # os.unlink('data/test_db') 23 client.close()
24
25
Consider removing the commented out code block
15 TestClient: A client for testing the application.
16 """
17 create_db_and_tables()
18 # seed_db() 19 client = TestClient(app)
20 yield client
21 delete_db_and_tables()
Consider removing the commented out code block
23 client = TestClient(app)
24 yield client
25 delete_db_and_tables()
26 # os.unlink('data/test_db') 27 client.close()
28
29
Consider removing the commented out code block
19 TestClient: A client for testing the application.
20 """
21 create_db_and_tables()
22 # seed_db() 23 client = TestClient(app)
24 yield client
25 delete_db_and_tables()
Description
It is recommended to remove any commented code in your codebase.
Bad practice
for item in sequence:
# print(item)
do_something(item)
# def old_function():
# '''Older implementation that has been replaced'''
# data = get_data()
# api.post(data)
Recommended
for item in sequence:
do_something(item)