fixup test for cfg_editor utils to run from non-checkout, and fix names, and remove example code
Change-Id: I6224244392e2a2d0928065ba24abcbe822096084 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/34934 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de>
This commit is contained in:
@ -2,20 +2,3 @@
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def constants():
|
||||
# setup
|
||||
class Constants:
|
||||
ONE = 1
|
||||
TWO = 2
|
||||
c = Constants()
|
||||
yield c
|
||||
# teardown
|
||||
del c
|
||||
|
||||
|
||||
# pylint: disable=redefined-builtin
|
||||
@pytest.fixture(scope="session")
|
||||
def globals():
|
||||
return {}
|
||||
|
13
test/test_cfg_editor.py
Normal file
13
test/test_cfg_editor.py
Normal file
@ -0,0 +1,13 @@
|
||||
from pathlib import Path
|
||||
|
||||
from frappy.gui.cfg_editor.utils import get_modules, get_interfaces
|
||||
from frappy.lib import generalConfig
|
||||
|
||||
basedir = Path(__file__).parent.parent.absolute()
|
||||
|
||||
|
||||
def test_imports():
|
||||
generalConfig.testinit(basedir=basedir)
|
||||
|
||||
get_modules()
|
||||
get_interfaces()
|
@ -1,14 +0,0 @@
|
||||
|
||||
from frappy.gui.cfg_editor.utils import get_modules
|
||||
|
||||
def test_assert():
|
||||
assert 1
|
||||
|
||||
|
||||
def test_constants(constants):
|
||||
assert constants.ONE == 1
|
||||
assert constants.TWO == 2
|
||||
|
||||
|
||||
def test_imports():
|
||||
get_modules()
|
Reference in New Issue
Block a user