Example tests for services! General cleanup.

(cherry picked from commit 9f41bb4)
This commit is contained in:
Ebag333
2017-03-23 15:52:26 -07:00
parent 13305d9ee1
commit 5d5c95fb2c
4 changed files with 17 additions and 1071 deletions

View File

@@ -10,7 +10,7 @@ from service.attribute import Attribute
def test_attribute():
"""
We don't really have much to test here, to throw a generic attribute at it and validate we get the expected results
We don't really have much to test here, so throw a generic attribute at it and validate we get the expected results
:return:
"""

File diff suppressed because it is too large Load Diff

View File

@@ -1,60 +0,0 @@
"""import tests."""
import os
import sys
# import importlib
# noinspection PyPackageRequirements
# import pytest
'''
script_dir = os.path.dirname(os.path.abspath(__file__))
# Add root to python paths, this allows us to import submodules
sys.path.append(os.path.realpath(os.path.join(script_dir, '..')))
# noinspection PyPep8
import service
# noinspection PyPep8
import gui
# noinspection PyPep8
import eos
# noinspection PyPep8
import utils
def test_packages():
assert service
assert gui
assert eos
assert utils
def service_modules():
for root, folders, files in os.walk("service"):
for file_ in files:
if file_.endswith(".py") and not file_.startswith("_"):
mod_name = "{}.{}".format(
root.replace("/", "."),
file_.split(".py")[0],
)
yield mod_name
def eos_modules():
for root, folders, files in os.walk("eos"):
for file_ in files:
if file_.endswith(".py") and not file_.startswith("_"):
mod_name = "{}.{}".format(
root.replace("/", "."),
file_.split(".py")[0],
)
yield mod_name
'''
# TODO: Disable walk through Eos paths until eos.types is killed. eos.types causes the import to break
'''
@pytest.mark.parametrize("mod_name", eos_modules())
def test_eos_imports(mod_name):
assert importlib.import_module(mod_name)
'''