Raise Exception: 'NoneType' object has no attribute 'get' #761
-
test_login.py class TestLogin(BaseCase): if name="main" I have python application project in visual studio and have above file as test_login.py. The problem is This code work properly in command line execution i.e pytest test_login.py but in debug mode above code execution show me below exception Exception : AttributeError("'NoneType' object has no attribute 'get'") can you please tell where I am doing wrong. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@iqbalshekh
|
Beta Was this translation helpful? Give feedback.
-
To use Debug Mode, drop this into your tests where you want a breakpoint: |
Beta Was this translation helpful? Give feedback.
@iqbalshekh
Eight things:
except Exception
:
at the end of theexcept Exception
line:
at the end of theif
lineself.get()
line==
, not=
if __name__ == "__main__" :
But most importantly:
pytest
. (So don't useif __name__ == "__main__" :
)