Edgewall Software
Modify

Opened 18 months ago

Last modified 18 months 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?

Attachments (0)

Change History (1)

comment:1 Changed 18 months ago by rjollos

  • Description modified (diff)

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
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'.
Author


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

 
Note: See TracTickets for help on using tickets.