Opened 5 months ago

Closed 5 months ago

#27775 closed enhancement (fixed)

Fix some py3 doctests in src/sage/doctests

Reported by: jhpalmieri Owned by:
Priority: major Milestone: sage-8.8
Component: python3 Keywords:
Cc: Merged in:
Authors: John Palmieri Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 9401f18 (Commits) Commit: 9401f1842ef9723c1014d9c8943c41d8f1f8ff13
Dependencies: Stopgaps:

Description

In a few cases, Python 2 and 3 print different error messages for the same bad input. In one case,

Change History (5)

comment:1 Changed 5 months ago by jhpalmieri

  • Branch set to u/jhpalmieri/py3-doctest

comment:2 Changed 5 months ago by jhpalmieri

  • Commit set to 9401f1842ef9723c1014d9c8943c41d8f1f8ff13
  • Status changed from new to needs_review

New commits:

9401f18trac 27775: py3 doctests in src/sage/doctest

comment:3 Changed 5 months ago by jhpalmieri

This leaves one more bad doctest, which I don't know how to fix:

sage -t --long src/sage/doctest/test.py
**********************************************************************
File "src/sage/doctest/test.py", line 247, in sage.doctest.test
Failed example:
    os.kill(pid, signal.SIGQUIT) # long time; 2 seconds passed => still alive
Exception raised:
    Traceback (most recent call last):
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.beta4/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.beta4/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1105, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.doctest.test[26]>", line 1, in <module>
        os.kill(pid, signal.SIGQUIT) # long time; 2 seconds passed => still alive
    ProcessLookupError: [Errno 3] No such process
**********************************************************************
File "src/sage/doctest/test.py", line 249, in sage.doctest.test
Failed example:
    os.kill(pid, signal.SIGQUIT) # long time; 25 seconds passed => dead
Exception raised:
    Traceback (most recent call last):
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.beta4/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.beta4/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1105, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.doctest.test[28]>", line 1, in <module>
        os.kill(pid, signal.SIGQUIT) # long time; 25 seconds passed => dead
    ProcessLookupError: [Errno 3] No such process
**********************************************************************
1 item had failures:
   2 of  55 in sage.doctest.test
    [54 tests, 2 failures, 103.55 s]

comment:4 Changed 5 months ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

Well, it still is progress. LGTM.

comment:5 Changed 5 months ago by vbraun

  • Branch changed from u/jhpalmieri/py3-doctest to 9401f1842ef9723c1014d9c8943c41d8f1f8ff13
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.