Edgewall Software

Opened 2 years ago

Last modified 2 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)
    u'1 < 2 …'
    '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?

Attachments (0)

Change History (1)

comment:1 Changed 2 years ago by rjollos

  • Description modified (diff)

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain cmlenz.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from cmlenz to the specified user.
The owner will be changed from cmlenz to anonymous. Next status will be 'assigned'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.