Skip to content
SPECIFICTION
Get listed

Hspec vs pytest

Hspec

hspec.github.io

pytest

pytest.org

Side by side

FigureHspecpytest
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
LinuxYesYes
Plans published11
Spec score · Unit Testing8.0 (#9)7.4 (#20)
Spec score · Unit Testing Frameworks8.1 (#10)7.4 (#26)
IntegrationsHspec integrates with QuickCheck, SmallCheck, and HUnit.The documentation describes loading external plugins, including pytest-cov, and pytest can be invoked from Python code.
PurposeHspec is a testing framework for Haskell.pytest is a framework for writing small, readable tests that can scale to complex functional testing for applications and libraries.
Test discoveryThe `hspec-discover` preprocessor scans for spec files and generates test driver boilerplate.pytest automatically discovers test modules and functions using standard naming conventions.

Plans

Hspec

  • HspecFree

Hspec pricing →

pytest

  • pytestFree

pytest pricing →

In their own words

Hspec

Hspec has no write-up on Specifiction yet; its figures are above.

Visit hspec.github.io

pytest

pytest has no write-up on Specifiction yet; its figures are above.

Visit pytest.org