Skip to content

renzon/pytest-vs-unittest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytest-vs-unittest

Comparison between pytest and unittes test frameworks

##Comparison Table

Feature Pytest Unittest Winner
Installation Third Party Built in Unittest
Basic Infra Can be only a function Inheritance Pytest
Basic Assertion Builtin assert TestCase instance methods Pytest
Flat is better than nested Function (1 level) Method (2 level) Pytest
Can run each other test Can run unittest tests Can't pytest test Pytest
Test Result on console Error Highlight, code snippet Only line error, no highlight Pytest
Multi param test Yes, parametrize, keep flat Yes, sub-test, increase nesting Pytest
Test setup fixture: module, session, function Template Method: setup, tearDown Pytest
Name Refactoring poor, because of name conventions rich, regular object orientation Unittest
Running Failed Tests built in (--lf, --ff) your own =,( Pytest
Marks built in your own =,( Pytest

About

Comparison between pytest and unittes test frameworks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages