sagemath / sage-patchbot

Sage Patchbot
https://www.sagemath.org
Other
8 stars 17 forks source link

cmdline.py doctest failure with patchbot in Google Cloud #43

Closed rwst closed 9 years ago

rwst commented 10 years ago

Because I cannot reproduce it outside of patchbot, I'll put it here, as long as the actual cause is unknown.

sage -t --long src/sage/tests/cmdline.py
**********************************************************************
File "src/sage/tests/cmdline.py", line 467, in sage.tests.cmdline.test_executable
Failed example:
    ret, err
Expected:
    (0, '')
Got:
    (1, 'Traceback (most recent call last):\n  File "/home/ralf/sage/src/bin/sage-dev", line 334, in <module>\n    parser = parser_from_object(DEV)\n  File "/home/ralf/sage/src/bin/sage-dev", line 258, in parser_from_object\n    parser = argparse.ArgumentParser(*args, **kwds)\n  File "/home/ralf/sage/local/lib/python/argparse.py", line 1600, in __init__\n    help=_(\'show this help message and exit\'))\n  File "/home/ralf/sage/local/lib/python/argparse.py", line 1291, in add_argument\n    self._get_formatter()._format_args(action, None)\n  File "/home/ralf/sage/local/lib/python/argparse.py", line 2314, in _get_formatter\n    return self.formatter_class(prog=self.prog)\n  File "/home/ralf/sage/src/bin/sage-dev", line 37, in __init__\n    width=DEV._sagedev._UI._get_dimensions()[1]-2, *args, **kwds)\n  File "/home/ralf/sage/local/lib/python2.7/site-packages/sage/dev/cmd_line_interface.py", line 264, in _get_dimensions\n    fd = os.open(os.ctermid(), os.O_RDONLY)\nOSError: [Errno 6] No such device or address: \'/dev/tty\'\n')
**********************************************************************
File "src/sage/tests/cmdline.py", line 474, in sage.tests.cmdline.test_executable
Failed example:
    ('usage: sage-dev' in out) or ('Developer interface disabled' in out)
Expected:
    True
Got:
    False
**********************************************************************
1 item had failures:

Of course /dev/tty exists and is readable in the cloud.

robertwb commented 10 years ago

I think this is because you're running a patchbot without a controlling terminal.

http://www.linuxquestions.org/questions/linux-general-1/dev-tty-no-such-device-or-address-469400/

robertwb commented 10 years ago

http://trac.sagemath.org/ticket/16493

fchapoton commented 9 years ago

ticket http://trac.sagemath.org/ticket/16493 has been fixed.