mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-02-23 15:54:14 +01:00
log testname on test run
This commit is contained in:
parent
5f6addfbc8
commit
e10a51dd02
|
|
@ -14,8 +14,8 @@
|
|||
@author: Bastian Schroll
|
||||
@description: Unittests for BOSWatch. File must be _run as "pytest" unittest
|
||||
"""
|
||||
|
||||
import pytest # import the pytest framework
|
||||
import pytest
|
||||
import logging
|
||||
import time
|
||||
|
||||
from boswatch.network.server import TCPServer
|
||||
|
|
@ -25,6 +25,9 @@ from boswatch.network.client import TCPClient
|
|||
class Test_ServerClient:
|
||||
"""!Unittest for the server/client environment"""
|
||||
|
||||
def setup_method(self, method):
|
||||
logging.debug("[TEST] %s.%s" % (type(self).__name__, method.__name__))
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def useServer(self):
|
||||
"""!Start and serve the sever for each functions where useServer is given"""
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@
|
|||
@author: Bastian Schroll
|
||||
@description: Unittests for BOSWatch. File must be _run as "pytest" unittest
|
||||
"""
|
||||
|
||||
# import pytest # import the pytest framework
|
||||
import logging
|
||||
|
||||
from boswatch.utils import paths
|
||||
from boswatch.config import Config
|
||||
|
|
@ -24,6 +23,9 @@ from boswatch.config import Config
|
|||
class Test_Config:
|
||||
"""!Unittests for the config"""
|
||||
|
||||
def setup_method(self, method):
|
||||
logging.debug("[TEST] %s.%s" % (type(self).__name__, method.__name__))
|
||||
|
||||
def test_loadLocalConfig(self):
|
||||
"""!load a local config file"""
|
||||
bwConfig = Config()
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
@author: Bastian Schroll
|
||||
@description: Unittests for BOSWatch. File must be _run as "pytest" unittest
|
||||
"""
|
||||
import logging
|
||||
|
||||
from boswatch.decoder import decoder
|
||||
|
||||
|
|
@ -21,6 +22,10 @@ from boswatch.decoder import decoder
|
|||
class Test_Decoder:
|
||||
"""!Unittests for the decoder"""
|
||||
|
||||
def setup_method(self, method):
|
||||
logging.debug("[TEST] %s.%s" % (type(self).__name__, method.__name__))
|
||||
logging.
|
||||
|
||||
def test_decoderNoData(self):
|
||||
"""!Test a empty string"""
|
||||
assert decoder.getDecoder("").decode("") is None
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@
|
|||
@author: Bastian Schroll
|
||||
@description: Unittests for BOSWatch. File must be _run as "pytest" unittest
|
||||
"""
|
||||
|
||||
# import pytest # import the pytest framework
|
||||
import logging
|
||||
|
||||
from boswatch.descriptor.descriptor import Descriptor
|
||||
from boswatch.descriptor.descriptor import DescriptionList
|
||||
|
|
@ -25,6 +24,9 @@ from boswatch.packet.packet import Packet
|
|||
class Test_Descriptor:
|
||||
"""!Unittests for the descriptor"""
|
||||
|
||||
def setup_method(self, method):
|
||||
logging.debug("[TEST] %s.%s" % (type(self).__name__, method.__name__))
|
||||
|
||||
def test_loadCsvNotExist(self):
|
||||
"""!read CSV file where not exist direct per DescriptionList class"""
|
||||
descList = DescriptionList()
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@
|
|||
@author: Bastian Schroll
|
||||
@description: Unittests for BOSWatch. File must be _run as "pytest" unittest
|
||||
"""
|
||||
|
||||
|
||||
# import pytest # import the pytest framework
|
||||
import logging
|
||||
|
||||
from boswatch.utils import header
|
||||
|
||||
|
|
@ -24,6 +22,9 @@ from boswatch.utils import header
|
|||
class Test_Header:
|
||||
"""!Unittests for the header"""
|
||||
|
||||
def setup_method(self, method):
|
||||
logging.debug("[TEST] %s.%s" % (type(self).__name__, method.__name__))
|
||||
|
||||
def test_logoToLog(self):
|
||||
"""!Test logo to log"""
|
||||
assert header.logoToLog()
|
||||
|
|
|
|||
|
|
@ -14,9 +14,8 @@
|
|||
@author: Bastian Schroll
|
||||
@description: Unittests for BOSWatch. File must be _run as "pytest" unittest
|
||||
"""
|
||||
|
||||
|
||||
import pytest # import the pytest framework
|
||||
import pytest
|
||||
import logging
|
||||
|
||||
from boswatch.packet.packet import Packet
|
||||
|
||||
|
|
@ -24,6 +23,9 @@ from boswatch.packet.packet import Packet
|
|||
class Test_Packet:
|
||||
"""!Unittests for the BOSWatch packet"""
|
||||
|
||||
def setup_method(self, method):
|
||||
logging.debug("[TEST] %s.%s" % (type(self).__name__, method.__name__))
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def buildPacket(self):
|
||||
"""!Build a BOSWatch packet and serve it to each test"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue