File: test_app.py

package info (click to toggle)
python-qtconsole 5.6.1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,184 kB
  • sloc: python: 7,222; makefile: 180; sh: 36
file content (31 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""Test QtConsoleApp"""

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

import os
import sys
from subprocess import check_output

from jupyter_core import paths
import pytest
from traitlets.tests.utils import check_help_all_output

from . import no_display


@pytest.mark.skipif(no_display, reason="Doesn't work without a display")
def test_help_output():
    """jupyter qtconsole --help-all works"""
    check_help_all_output('qtconsole')


@pytest.mark.skipif(no_display, reason="Doesn't work without a display")
@pytest.mark.skipif(os.environ.get('CI', None) is None,
                    reason="Doesn't work outside of our CIs")
def test_generate_config():
    """jupyter qtconsole --generate-config"""
    config_dir = paths.jupyter_config_dir()
    check_output([sys.executable, '-m', 'qtconsole', '--generate-config'])
    assert os.path.isfile(os.path.join(config_dir,
                                       'jupyter_qtconsole_config.py'))