mirror of https://github.com/milvus-io/milvus.git
Add test case name in test logs (#6431)
Signed-off-by: Binbin Lv <binbin.lv@zilliz.com>pull/6431/merge
parent
a8e5fd2024
commit
594b89067f
|
@ -50,8 +50,9 @@ class Base:
|
|||
log.info("[teardown_class] Start teardown class...")
|
||||
pass
|
||||
|
||||
def setup(self):
|
||||
def setup_method(self, method):
|
||||
log.info(("*" * 35) + " setup " + ("*" * 35))
|
||||
log.info("[setup_method] Start setup test case %s..." % method.__name__)
|
||||
self.connection_wrap = ApiConnectionsWrapper()
|
||||
self.utility_wrap = ApiUtilityWrapper()
|
||||
self.collection_wrap = ApiCollectionWrapper()
|
||||
|
@ -60,8 +61,9 @@ class Base:
|
|||
self.collection_schema_wrap = ApiCollectionSchemaWrapper()
|
||||
self.field_schema_wrap = ApiFieldSchemaWrapper()
|
||||
|
||||
def teardown(self):
|
||||
def teardown_method(self, method):
|
||||
log.info(("*" * 35) + " teardown " + ("*" * 35))
|
||||
log.info("[teardown_method] Start teardown test case %s..." % method.__name__)
|
||||
|
||||
try:
|
||||
""" Drop collection before disconnect """
|
||||
|
|
|
@ -15,7 +15,8 @@ class TestLog:
|
|||
self.log.setLevel(logging.DEBUG)
|
||||
|
||||
try:
|
||||
formatter = logging.Formatter("[%(asctime)s - %(levelname)s - %(name)s]: %(message)s (%(filename)s:%(lineno)s)")
|
||||
formatter = logging.Formatter("[%(asctime)s - %(levelname)s - %(name)s]: "
|
||||
"%(message)s (%(filename)s:%(lineno)s)")
|
||||
dh = logging.FileHandler(self.log_debug)
|
||||
dh.setLevel(logging.DEBUG)
|
||||
dh.setFormatter(formatter)
|
||||
|
|
Loading…
Reference in New Issue