Improve the way the project tree is managed and elements deleted.

This commit is contained in:
Veronica K. B. Olsen
2020-09-17 14:03:51 +02:00
parent 9bca006a45
commit 27ee82aad0
4 changed files with 47 additions and 27 deletions
+10 -1
View File
@@ -5,7 +5,7 @@
import pytest
from nw.common import (
checkString, checkBool, checkInt, colRange, formatInt, transferCase,
fuzzyTime
fuzzyTime, checkHandle
)
from nwtools import cmpList
@@ -42,6 +42,15 @@ def testCheckBool():
assert checkBool(1.0, None, False) is None
assert checkBool(2.0, None, False) is None
@pytest.mark.core
def testCheckHandle():
assert checkHandle("None", 1, True) is None
assert checkHandle("None", 1, False) == 1
assert checkHandle(None, 1, True) is None
assert checkHandle(None, 1, False) == 1
assert checkHandle("47666c91c7ccf", None, False) == "47666c91c7ccf"
assert checkHandle("h7666c91c7ccf", None, False) is None
@pytest.mark.core
def testColRange():
assert colRange([0, 0], [0, 0], 0) is None