[issue32042] Option for comparing values instead of reprs in doctest

Tomáš Petříček report at bugs.python.org
Wed Nov 15 16:39:32 EST 2017


New submission from Tomáš Petříček <tpetricek at gmail.com>:

Would there be an interest and possibility to add an option to the doctest module to compare values instead of reprs? The idea is that the expected value would be eval'ed prior to comparison if this option was enabled.

Motivation for this option is to enable comparison of values (states) as defined in the respective classes and not by a representation which might vary ({'a', 'b'} vs {'b', 'a'}, 'value' vs "value" etc.).

----------
components: Library (Lib), Tests
messages: 306311
nosy: Tomáš Petříček
priority: normal
severity: normal
status: open
title: Option for comparing values instead of reprs in doctest
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32042>
_______________________________________


More information about the Python-bugs-list mailing list