| 1 |
# ----------------------------------------------------------------------------- |
| 2 |
# Copyright (C) 2010-2011 The IPython Development Team. |
| 3 |
# |
| 4 |
# Distributed under the terms of the BSD License. |
| 5 |
# |
| 6 |
# The full license is in the file COPYING.txt, distributed with this software. |
| 7 |
# ----------------------------------------------------------------------------- |
| 8 |
import io |
| 9 |
|
| 10 |
# N.B. For the test suite, page.page is overridden (see IPython.testing.globalipapp) |
| 11 |
from IPython.core import page |
| 12 |
|
| 13 |
|
| 14 |
def test_detect_screen_size(): |
| 15 |
"""Simple smoketest for page._detect_screen_size.""" |
| 16 |
try: |
| 17 |
page._detect_screen_size(True, 25) |
| 18 |
except (TypeError, io.UnsupportedOperation): |
| 19 |
# This can happen in the test suite, because stdout may not have a |
| 20 |
# fileno. |
| 21 |
pass |