File: test_imports.py

package info (click to toggle)
python-nexpy 1.0.10-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,836 kB
  • sloc: python: 13,880; xml: 7,531; makefile: 130; sh: 1
file content (40 lines) | stat: -rw-r--r-- 997 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
34
35
36
37
38
39
40
import os

import pytest


def test_api_imports():
    try:
        import nexpy.api.frills.fit
    except ImportError as error:
        pytest.fail(str(error))


def test_gui_import():
    os.environ['QT_API'] = 'pyqt5'
    try:
        import nexpy.gui.pyqt
        import nexpy.gui.consoleapp
        import nexpy.gui.datadialogs
        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))