Skip to content

Commit 35851dc

Browse files
authored
Dev/eccles/remove unnecessary unittests (#17)
* Build about.py in builder image Problem: Creating about.py in host environmant fails if python setuptools is unavailable Solution: Create about.py using docker image. Signed-off-by: Paul Hewlett <phewlett76@gmail.com> * Suppress unittest coverage for timestamp.py Problem: Timestamp.py is so simple it does not warrant unittests. Solution: Add correct method of suppressing unittests for individual files and remove unittests for timestamp.py. Signed-off-by: Paul Hewlett <phewlett76@gmail.com>
1 parent 5c7e1c5 commit 35851dc

4 files changed

Lines changed: 10 additions & 44 deletions

File tree

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tasks:
55
about:
66
desc: Generate about.py
77
cmds:
8-
- ./scripts/version.sh
8+
- ./scripts/builder.sh ./scripts/version.sh
99
status:
1010
- test -s archivist/about.py
1111

archivist/logger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def set_logger(level):
1616
Setup logger
1717
Also used by unittests
1818
"""
19-
LOGGER.setLevel(level) # pragma: no cover
20-
if not LOGGER.hasHandlers(): # pragma: no cover
19+
LOGGER.setLevel(level)
20+
if not LOGGER.hasHandlers():
2121
handler = logging.StreamHandler()
2222
handler.setFormatter(
2323
logging.Formatter(

setup.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,10 @@ max-line-length = 88
55

66
[coverage:report]
77
fail_under = 100
8+
9+
[coverage:run]
10+
omit =
11+
# utility
12+
archivist/logger.py
13+
# so simple - not worth testing
14+
archivist/timestamp.py

unittests/testtimestamp.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)