doctest-ignore-unicode

Add flag to ignore unicode literal prefixes in doctests


License
Apache-2.0
Install
pip install doctest-ignore-unicode==0.1.2

Documentation

Overview

doctest-ignore-unicode is a plugin (currently only for Nose) that adds a flag to ignore unicode literal prefixes in doctests.

The implmentation is inspired by https://github.com/nltk/nltk/blob/2and3/nltk/test/doctest_nose_plugin.py

Usage

>>> def hello_world():
...     return 'Hello World'
>>> hello_world()  # doctest: +IGNORE_UNICODE
u'Hello World'

FAQ

Why?

If you need to ask you probably don't need it. (Hint: supporting python 2 & 3 in the same codebase).