Edgewall Software

Opened 6 years ago

Last modified 6 years ago

#611 new enhancement

Use pytest for running tests

Reported by: jaraco@… Owned by: cmlenz
Priority: major Milestone: 0.8
Component: General Version: 0.7
Keywords: Cc:

Description (last modified by rjollos)

I'm working on a branch to support a unified codebase for Python 2 and 3 (https://github.com/jaraco/genshi/tree/feature/py3-native). One problem I'm up against is the doctests failing thus:

File "/Users/jaraco/Dropbox/code/public/genshi/genshi/util.py", line 207, in genshi.util.stripentities
Failed example:
    stripentities('1 < 2 …', keepxmlentities=True)
Expected:
    u'1 < 2 …'
Got:
    '1 < 2 …'

Pytest has a solution for this (https://docs.pytest.org/en/latest/doctest.html), a plugin for doctest that allows unicode to match even on Python 2 where the 'u' prefixes text strings.

Pytest also brings lots of nice features for test discovery, fixtures, and other nice features.

Could Genshi adopt pytest as its test runner?

Change History (1)

comment:1 Changed 6 years ago by rjollos

  • Description modified (diff)
Note: See TracTickets for help on using tickets.