#14359 closed enhancement (fixed)
doctest spurious UnicodeWarning
Reported by: | Volker Braun | Owned by: | Minh Van Nguyen |
---|---|---|---|
Priority: | major | Milestone: | sage-5.9 |
Component: | doctest framework | Keywords: | |
Cc: | Leif Leonhardy | Merged in: | sage-5.9.beta2 |
Authors: | Volker Braun | Reviewers: | Jeroen Demeyer |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #12415, #14331, #13278 | Stopgaps: |
Description (last modified by )
Doctests currently generate a spurious unicode warining:
[vbraun@localhost hg]$ sage -t sage/tests/french_book/polynomes.py Running doctests with ID 2013-03-26-13-06-20-1ebc47c6. Doctesting 1 file. sage -t sage/tests/french_book/polynomes.py /home/vbraun/opt/sage-5.9.beta1/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py:229: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal if code[q-1] == u'\\': [107 tests, 1.1 s]
Apply trac_14359_doctest_unicode_warning.patch
Attachments (1)
Change History (17)
comment:1 Changed 10 years ago by
Authors: | → Volker Braun |
---|---|
Summary: | doctest suprious UnicodeWarning → doctest spurious UnicodeWarning |
comment:2 Changed 10 years ago by
comment:3 Changed 10 years ago by
Cc: | Leif Leonhardy added |
---|
comment:4 Changed 10 years ago by
Description: | modified (diff) |
---|
comment:5 follow-up: 7 Changed 10 years ago by
I think we should ignore ansi color sequences in doctests, I'm pretty sure this is the cause behind https://groups.google.com/d/msg/sage-release/9EyC1RhSg90/BooDydikYs8J though I don't know why they are not properly disabled in Hugh's setup.
comment:6 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Status: | new → needs_review |
comment:7 Changed 10 years ago by
Replying to vbraun:
I think we should ignore ansi color sequences in doctests
Can we leave this for a different ticket until we really sure what the cause is?
Positive review to trac_14359_doctest_unicode_warning.patch
comment:8 follow-up: 9 Changed 10 years ago by
Its definitely the cause for run_doctests
not working on the Sage command line. Switch colors off (%color NoColor
) and it works. I don't think it really matters what Hugh's problem is.
comment:9 Changed 10 years ago by
comment:10 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Reviewers: | → Jeroen Demeyer |
Status: | needs_review → positive_review |
comment:11 Changed 10 years ago by
Dependencies: | → #12415, #14331, #13278 |
---|
comment:13 Changed 10 years ago by
Status: | positive_review → needs_work |
---|
sage -t --long devel/sage/sage/doctest/sources.py ********************************************************************** File "devel/sage/sage/doctest/sources.py", line 664, in sage.doctest.sources.FileDocTestSource._test_enough_doctests Failed example: for path, dirs, files in itertools.chain(os.walk('sage'), os.walk('doc')): # long time path = os.path.relpath(path) dirs.sort(); files.sort() for F in files: _, ext = os.path.splitext(F) if ext in ('.py', '.pyx', '.sage', '.spyx', '.rst'): filename = os.path.join(path, F) FDS = FileDocTestSource(filename, DocTestDefaults(long=True,optional=True)) FDS._test_enough_doctests(verbose=False) Expected: There are 18 tests in sage/combinat/partition.py that are not being run There are 12 tests in sage/combinat/tableau.py that are not being run There are 3 unexpected tests being run in sage/doctest/parsing.py There are 1 unexpected tests being run in sage/doctest/reporting.py There are 1 tests in sage/ext/c_lib.pyx that are not being run There are 9 tests in sage/graphs/graph_plot.py that are not being run There are 2 tests in sage/server/notebook/worksheet.py that are not being run doctest:229: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal Got: There are 18 tests in sage/combinat/partition.py that are not being run There are 12 tests in sage/combinat/tableau.py that are not being run There are 3 unexpected tests being run in sage/doctest/parsing.py There are 1 unexpected tests being run in sage/doctest/reporting.py There are 1 tests in sage/ext/c_lib.pyx that are not being run There are 9 tests in sage/graphs/graph_plot.py that are not being run There are 2 tests in sage/server/notebook/worksheet.py that are not being run **********************************************************************
comment:14 Changed 10 years ago by
Status: | needs_work → positive_review |
---|
comment:15 Changed 10 years ago by
Merged in: | → sage-5.9.beta2 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
comment:16 Changed 10 years ago by
Component: | doctest → doctest framework |
---|
See also #14153.