Skip to content Skip to sidebar Skip to footer
Showing posts with the label Doctest

Doctest Failing Inspite Of Having Correct Output

My function is def validate_latitude(lat): '''Enforce latitude is in range >… Read more Doctest Failing Inspite Of Having Correct Output

Can I Have An Ellipsis At The Beginning Of The Line In A Python Doctest?

Python doctests are cool. Let me start with a simple example: def foo(): ''' >&g… Read more Can I Have An Ellipsis At The Beginning Of The Line In A Python Doctest?

How Can I Make Doctests Triggered By Pytest Ignore Unicode Prefix `u'...'` Of Strings?

I want my code to work in Python 2 and 3. I use doctests and from __future__ import unicode_literal… Read more How Can I Make Doctests Triggered By Pytest Ignore Unicode Prefix `u'...'` Of Strings?

Multi Version Support For Python Doctests

I am writing my doctests like this: >>> some_function(a=1, b=2) {u'id': u'123&… Read more Multi Version Support For Python Doctests

Wrapping Python Doctest Results That Are Longer Than 80 Characters

I'm trying to keep my source code under the 80 character guideline width that PEP8 recommends, … Read more Wrapping Python Doctest Results That Are Longer Than 80 Characters

Is There Way To Only Perform The Doctests, Ignoring Print Function Calls?

Hypothetically speaking, my function returns a value and has lot of print statements (maybe 100 or … Read more Is There Way To Only Perform The Doctests, Ignoring Print Function Calls?

Python Doctest: Skip A Test Conditionally

I know how to skip a doctest using # doctest: +SKIP, but I can't figure out how to skip a test … Read more Python Doctest: Skip A Test Conditionally