Use ==/!= to compare str, bytes, and int literals

Python 3.8 will probably [raise SyntaxWarnings](https://docs.python.org/3/whatsnew/3.8.html#changes-in-python-behavior) on the flake8 F632 issue raised below.

[flake8](http://flake8.pycqa.org) testing of https://github.com/spulec/moto on Python 3.7.1

$ __flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics__
```
./tests/test_awslambda/test_lambda.py:1137:24: F632 use ==/!= to compare str, bytes, and int literals
                assert len(messages) is 3
                       ^
1     F632 use ==/!= to compare str, bytes, and int literals
1
```
This commit is contained in:
Christian Clauss 2019-10-18 09:03:31 +02:00 committed by GitHub
parent 36a8a4ad00
commit c3c75c12d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1134,7 +1134,7 @@ def test_invoke_function_from_sqs_exception():
if 'I failed!' in event['message']:
messages = queue.receive_messages(MaxNumberOfMessages=10)
# Verify messages are still visible and unprocessed
assert len(messages) is 3
assert len(messages) == 3
return
time.sleep(1)