Minor improvements to existing tests to increase coverage
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
"""novelWriter Common Class Tester
|
||||
"""
|
||||
|
||||
import time
|
||||
import pytest
|
||||
|
||||
from nw.common import (
|
||||
checkString, checkBool, checkInt, colRange, formatInt, transferCase,
|
||||
fuzzyTime, checkHandle
|
||||
fuzzyTime, checkHandle, formatTimeStamp
|
||||
)
|
||||
from nwtools import cmpList
|
||||
|
||||
@@ -75,6 +77,12 @@ def testColRange():
|
||||
[[200, 50, 0], [162, 87, 0], [124, 124, 0], [86, 161, 0], [50, 200, 0]]
|
||||
)
|
||||
|
||||
@pytest.mark.core
|
||||
def testFormatTime():
|
||||
tTime = time.mktime(time.gmtime(0))
|
||||
assert formatTimeStamp(tTime, False) == "1970-01-01 00:00:00"
|
||||
assert formatTimeStamp(tTime, True) == "1970-01-01 00.00.00"
|
||||
|
||||
@pytest.mark.core
|
||||
def testFormatInt():
|
||||
assert formatInt(1000) == "1000"
|
||||
|
||||
Reference in New Issue
Block a user