Re: [zopefoundation/zope.schema] 3cd600: It was a pain that ``ConstraintNotSatisfied`` did ...

Tres Seaver <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/06/2014 08:18 AM, GitHub wrote:

Author: Adam Groszer <[email protected]>


This change breaks the 'coverage' tests[1] (which run under nose):

- ------------------------------ %< --------------------------
coverage runtests: commands[2]
...F.................................................................................................................................................................................................................................................................................................................................................................................................................................
======================================================================
FAIL: Doctest: zope.schema._bootstrapfields.Text.fromUnicode
- ----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/Python-2.6.6/lib/python2.6/doctest.py", line 2163, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for
zope.schema._bootstrapfields.Text.fromUnicode
  File
"<http://jenkins.pylonsproject.org/job/zope.schema/ws/src/zope/schema/_bootstrapfields.py",>
line 327, in fromUnicode

- ----------------------------------------------------------------------
File
"<http://jenkins.pylonsproject.org/job/zope.schema/ws/src/zope/schema/_bootstrapfields.py",>
line 338, in zope.schema._bootstrapfields.Text.fromUnicode
Failed example:
    t.fromUnicode(u("foo spam"))
Expected:
    Traceback (most recent call last):
    ...
    ConstraintNotSatisfied: foo spam
Got:
    Traceback (most recent call last):
      File "/opt/Python-2.6.6/lib/python2.6/doctest.py", line 1253, in __run
        compileflags, 1) in test.globs
      File "<doctest zope.schema._bootstrapfields.Text.fromUnicode[5]>",
line 1, in <module>
        t.fromUnicode(u("foo spam"))
      File
"<http://jenkins.pylonsproject.org/job/zope.schema/ws/src/zope/schema/_bootstrapfields.py",>
line 343, in fromUnicode
        self.validate(str)
      File
"<http://jenkins.pylonsproject.org/job/zope.schema/ws/src/zope/schema/_bootstrapfields.py",>
line 183, in validate
        self._validate(value)
      File
"<http://jenkins.pylonsproject.org/job/zope.schema/ws/src/zope/schema/_bootstrapfields.py",>
line 310, in _validate
        super(MinMaxLen, self)._validate(value)
      File
"<http://jenkins.pylonsproject.org/job/zope.schema/ws/src/zope/schema/_bootstrapfields.py",>
line 213, in _validate
        raise ConstraintNotSatisfied(value, self.__name__)
    ConstraintNotSatisfied: (u'foo spam', '')
- ------------------------------ %< --------------------------

(Insert CannedRant#3 about doctests here).


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          [email protected]
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlLK668ACgkQ+gerLs4ltQ7/dwCeJyf2tpRfzG4HgLr8QJV9RQcl
vHAAn2AzMLxrBd2cg/GJnlRqTXIOMV65
=pPu8
-----END PGP SIGNATURE-----

_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.