Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TamariIntervalPosets: failing tests in options #24326

Closed
jdemeyer opened this issue Dec 4, 2017 · 10 comments
Closed

TamariIntervalPosets: failing tests in options #24326

jdemeyer opened this issue Dec 4, 2017 · 10 comments

Comments

@jdemeyer
Copy link

jdemeyer commented Dec 4, 2017

When the untested examples in src/sage/combinat/interval_posets.py involving GlobalOptions are actually tested:

sage -t --long src/sage/combinat/interval_posets.py
**********************************************************************
File "src/sage/combinat/interval_posets.py", line 2468, in sage.combinat.interval_posets.TamariIntervalPosets.options
Failed example:
    ip.latex_options.color_decreasing
Exception raised:
    Traceback (most recent call last):
      File "/usr/local/src/sage-config/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 515, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/local/src/sage-config/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 885, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.combinat.interval_posets.TamariIntervalPosets.options[1]>", line 1, in <module>
        ip.latex_options.color_decreasing
    AttributeError: 'function' object has no attribute 'color_decreasing'
**********************************************************************
File "src/sage/combinat/interval_posets.py", line 2471, in sage.combinat.interval_posets.TamariIntervalPosets.options
Failed example:
    ip.latex_options.color_decreasing
Exception raised:
    Traceback (most recent call last):
      File "/usr/local/src/sage-config/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 515, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/local/src/sage-config/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 885, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.combinat.interval_posets.TamariIntervalPosets.options[3]>", line 1, in <module>
        ip.latex_options.color_decreasing
    AttributeError: 'function' object has no attribute 'color_decreasing'
**********************************************************************
File "src/sage/combinat/interval_posets.py", line 2474, in sage.combinat.interval_posets.TamariIntervalPosets.options
Failed example:
    ip.latex_options.color_decreasing
Exception raised:
    Traceback (most recent call last):
      File "/usr/local/src/sage-config/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 515, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/local/src/sage-config/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 885, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.combinat.interval_posets.TamariIntervalPosets.options[5]>", line 1, in <module>
        ip.latex_options.color_decreasing
    AttributeError: 'function' object has no attribute 'color_decreasing'
**********************************************************************

Depends on #24322

CC: @sagetrac-sage-combinat @fchapoton @darijgr @VivianePons

Component: combinatorics

Author: Frédéric Chapoton

Branch/Commit: 305b769

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/24326

@jdemeyer jdemeyer added this to the sage-8.2 milestone Dec 4, 2017
@jdemeyer
Copy link
Author

jdemeyer commented Dec 4, 2017

Changed dependencies from #24323 to #24322

@darijgr
Copy link
Contributor

darijgr commented Dec 13, 2017

comment:3

This is just the doctests being wrong, right? ip.latex_options.color_decreasing should be ip.latex_options()["color_decreasing"]? Which is also doctested in the set_latex_options doc. So I guess we can remove the broken doctests?

@tscrim
Copy link
Collaborator

tscrim commented Dec 13, 2017

comment:4

Not quite, the latex_options() method returns the current latex options for that specific ip, whereas the global options are setting the defaults. I think they should become ip.options.color_decreasing (but I haven't checked yet). They definitely should not be removed.

Note that some of them are indirectly tested in set_latex_options in order to show the default vs specific behavior, but the doctests for the global options is also showing how to use the global options too. So also on that basis I say they should not be removed.

@fchapoton
Copy link
Contributor

Branch: u/chapoton/24326

@fchapoton
Copy link
Contributor

Commit: 305b769

@fchapoton
Copy link
Contributor

comment:5

please review


New commits:

305b769trac 24326 fixing options doctests in Tamari Intervals

@fchapoton
Copy link
Contributor

Author: Frédéric Chapoton

@fchapoton
Copy link
Contributor

comment:6

green bot

@tscrim
Copy link
Collaborator

tscrim commented Dec 15, 2017

Reviewer: Travis Scrimshaw

@vbraun
Copy link
Member

vbraun commented Dec 18, 2017

Changed branch from u/chapoton/24326 to 305b769

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants