FirebirdSQL / firebird-qa

Python tools used for Firebird QA
https://firebirdsql.org/en/devel-qa/
MIT License
3 stars 6 forks source link

Add test start time info to terminal report. #18

Closed ant-zuev closed 1 year ago

ant-zuev commented 1 year ago

Add test start time info to custom TerminalReporter. Now we always use custom reporter regardless of the 'install_terminals' option. write_ensure_prefix method has been redefined to print start time and nodeid without line break.

It looks like:

2023-05-19 17:38:19 tests/functional/basic/isql/test_00.py::test_1 PASSED [1/8]
2023-05-19 17:38:19 tests/functional/basic/isql/test_01.py::test_3 PASSED [2/8]
...
pavel-zotov commented 1 year ago
 def write_ensure_prefix(self, prefix: str, extra: str = "", **kwargs) -> None:
        start_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]

-- ?

ant-zuev commented 1 year ago
 def write_ensure_prefix(self, prefix: str, extra: str = "", **kwargs) -> None:
        start_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]

-- ?

Added milliseconds to the start time this way.

ant-zuev commented 1 year ago

Added "--start-time" option to print tests start time info. Don't print by default. Redefined write_fspath_result method to print info without verbose mode too.