Ticket #1204 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

2.8.13.alpha0: libs/cremona/constructor.py doctest failures

Reported by: mabshoff Owned by: failure
Priority: major Milestone: sage-2.8.13
Component: doctest Keywords:
Cc: Author(s):
Report Upstream: Reviewer(s):
Merged in: Work issues:

Description (last modified by mabshoff) (diff)

Fixed in 2.8.13.alpha1.

sage -t  devel/sage-main/sage/libs/cremona/constructor.py   **********************************************************************
File "constructor.py", line 42:
    sage: M = CremonaModularSymbols(-1)
Expected:
    Traceback (most recent call last):
    ...
    ValueError: the level (= -1) must be a positive integer
Got:
    Traceback (most recent call last):
      File "/tmp/Work-mabshoff/release-cycles/sage-2.8.13.alpha0/local/lib/python2.5/doctest.py", line 1212, in __run
        compileflags, 1) in test.globs
      File "<doctest __main__.example_0[4]>", line 1, in <module>
        M = CremonaModularSymbols(-Integer(1))###line 42:
    sage: M = CremonaModularSymbols(-1)
      File "/tmp/Work-mabshoff/release-cycles/sage-2.8.13.alpha0/local/lib/python2.5/site-packages/sage/libs/cremona/constructor.py", line 64, in CremonaModularSymbols
        return ModularSymbols(level=level, sign=sign, cuspidal=cuspidal, verbose=verbose)
      File "homspace.pyx", line 25, in sage.libs.cremona.homspace.ModularSymbols.__init__
        raise ValueError, "the level (= %s) must be at least 2"%level
    ValueError: the level (= -1) must be at least 2
**********************************************************************
File "constructor.py", line 46:
    sage: M = CremonaModularSymbols(0)
Expected:
    Traceback (most recent call last):
    ...
    ValueError: the level (= 0) must be a positive integer
Got:
    Traceback (most recent call last):
      File "/tmp/Work-mabshoff/release-cycles/sage-2.8.13.alpha0/local/lib/python2.5/doctest.py", line 1212, in __run
        compileflags, 1) in test.globs
      File "<doctest __main__.example_0[5]>", line 1, in <module>
        M = CremonaModularSymbols(Integer(0))###line 46:
    sage: M = CremonaModularSymbols(0)
      File "/tmp/Work-mabshoff/release-cycles/sage-2.8.13.alpha0/local/lib/python2.5/site-packages/sage/libs/cremona/constructor.py", line 64, in CremonaModularSymbols
        return ModularSymbols(level=level, sign=sign, cuspidal=cuspidal, verbose=verbose)
      File "homspace.pyx", line 25, in sage.libs.cremona.homspace.ModularSymbols.__init__
        raise ValueError, "the level (= %s) must be at least 2"%level
    ValueError: the level (= 0) must be at least 2
**********************************************************************

Change History

Changed 3 years ago by mabshoff

  • status changed from new to closed
  • resolution set to fixed
  • description modified (diff)
[01:37] <was_> In fact, now that I think about it, I think I changed the value error slightly.  Oops.
[01:37] <mabshoff> :)
[01:37] <was_> Feel free to just change the doctests in your code.  My mistake.
[01:37] <mabshoff> Ok, it was "ValueError: the level (= -1) must be at least 2" but it is now 
[01:38] <mabshoff> "ValueError: the level (= -1) must be a positive integer"
[01:43] <mabshoff> Ok, when I changed the Valueerror the doctest in sage -t  devel/sage-main/sage/libs/cremona/constructor.py passes
[01:43] <mabshoff> Does it really have to be \geq 2 or just postive?
[01:43] <was_> In theory the level must be >= 1.
[01:44] <was_> In Cremona's program, he didn't do level 1 correctly (it crashes), so it must be >= 2 for Cremona.
[01:44] <mabshoff> ok
[01:44] <was_> Level 1 just gives the 0 space anyways, so no problem.

Michael

Note: See TracTickets for help on using tickets.