Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

https://blog.jetbrains.com/pycharm/2020/06/visual-testing-with-pytest/




https://docs.pytest.org/en/stable/
1- create a test_xxx filein the same folder
2- run the testpytest -s (optional filename )



in pycharm
1- change the test tool to pytestFile Menu >> Setting >> Tools >> Python integrated tools

Image Modified

enable the script output ( allow printout )
Run Menu >> Test configuration

Edit the "pytest " >>> add "-s" in Additional Arguments

Image Removed

Image Added

Image Removed


Image Added

Create the test_xxx.py file
Go to the test file

Image Modified

Image Modified

Run the test

Run Menu >> RUn "pytest test_name_of_the_file.py"


Image Modified

orĀ 

Image Modified