Wyświetlaj wyniki testu Unittest Pythona w ładnej, tabelarycznej formie
Piszę narzędzie Pythonic, które sprawdza poprawność określonego systemu. Każda walidacja jest napisana jako Pythonunittest
, a raport wygląda tak:
test_exclude_list_not_empty (__main__.TestRepoLists)
Assert the the exclude list is not empty ... ok
test_include_list_not_empty (__main__.TestRepoLists)
Assert the the include list is not empty ... ok
test_repo_list_not_empty (__main__.TestRepoLists)
Assert the the repo list is not empty ... ok
Moim zdaniem ten format jest trudny do odczytania, zwłaszcza dla nie-Pythonistów. Czy istnieje generator raportów, który może wygenerować raport w ładnej, tabelarycznej formie, np .:
+----------------------------------------------------------------+-----------+
| Test | Status |
+----------------------------------------------------------------+-----------+
| Assert the the exclude list is not empty | OK |
| Assert the the include list is not empty | OK |
| Assert the the repo list is not empty | OK |
| All the items in the include list should be in the repo list | OK |
+----------------------------------------------------------------+-----------+
Wyjaśnienie Zestaw testów działa na zdalnym terminalu, dlatego preferuję narzędzia do raportowania z linii poleceń.