File: test_imports.py

package info (click to toggle)
python-nexpy 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,604 kB
  • sloc: python: 14,518; makefile: 12; sh: 1
file content (33 lines) | stat: -rw-r--r-- 857 bytes parent folder | download
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
32
33
import os

import pytest


def test_gui_import():
    os.environ['QT_API'] = 'pyqt5'
    try:
        import nexpy.gui.pyqt
        import nexpy.gui.consoleapp
        import nexpy.gui.dialogs
        import nexpy.gui.fitdialogs
        import nexpy.gui.importdialog
        import nexpy.gui.mainwindow
        import nexpy.gui.plotview
        import nexpy.gui.scripteditor
        import nexpy.gui.treeview
        import nexpy.gui.utils
        import nexpy.gui.widgets
    except ImportError as error:
        pytest.fail(str(error))


def test_reader_import():
    os.environ['QT_API'] = 'pyqt5'
    try:
        import nexpy.gui.pyqt
        import nexpy.readers.readspec
        import nexpy.readers.readstack
        import nexpy.readers.readtiff
        import nexpy.readers.readtxt
    except ImportError as error:
        pytest.fail(str(error))