-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PytestAssertRewriteWarning: asserting the value None, please use "assert is None" #6203
Comments
The warning is intentional. It suggests to you to change your assertions as follows: assert self._index.find('video', {'autoplay': ''}) is not None
assert self._index.find('video', {'controls': '', 'preload': ''}) is not None
assert self._index.find('video', {'poster': 'https://cdn12.picryl.com/photo/2016/12/31/lego-stones-plastic-education-8b9a7d-1024.jpg'}) is not None You can see issue #3191 for the rationale for the warning. Let us know if this isn't clear enough. |
@bluetech Still after giving autoplay="autoplay" in my video tag, I get the below error: /projects/challenge/test/test_webpage.py:27: PytestAssertRewriteWarning: asserting the value None, please use "assert is None"
Can you please help me out? |
Change it to the following: assert self._index.find('video', {'autoplay': ''}) is not None |
Hi , I am having same issue. Please help with what changes to be made for below code? ` <title>Destiny</title> ` |
You did not post any code, but the change is simple. It means you have this: assert <expr> You just need to change it to: assert <expr> is not None |
Here is the minimal demo that is working fine on local machine but showing warning while submitting for a handson
And here is the warning message
For below tests
The text was updated successfully, but these errors were encountered: