top of page
  • Writer's pictureRhash Algo

Misc 1: Pytest

Installation:

pip install -U pytest

Pytest Version:

$ pytest --version pytest 7.1.1


First Test

File Name: test_first.py

def samp(x): return x + 5 def test_samp(): assert samp(4) == 9


$ python3 -m pytest test_first.py 
========================================================== test session starts ===========================================================
platform darwin -- Python 3.10.6, pytest-7.1.3, pluggy-1.0.0
rootdir: /Users/rpaleru/Downloads/pytest
collected 1 item                                                                                                                         

test_first.py .                                                                                                                    [100%]

=========================================================== 1 passed in 0.00s ============================================================

1 view0 comments

Recent Posts

See All

Comentários


bottom of page