Skip to content

Commit 4ea9ec1

Browse files
kurtmckeeLudovicRousseau
authored andcommitted
Feedback: Add testing of GUID conversions
1 parent f9bd13d commit 4ea9ec1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/test_guid.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from smartcard.guid import GUIDToStr, strToGUID
2+
3+
4+
def test_roundtrip_string():
5+
string = '{AD4F1667-EA75-4124-84D4-641B3B197C65}'
6+
assert GUIDToStr(strToGUID(string)) == string
7+
8+
9+
def test_roundtrip_list_of_ints():
10+
list_of_ints = [
11+
103, 22, 79, 173, 117, 234, 36, 65, 132, 212, 100, 27, 59, 25, 124, 101
12+
]
13+
assert strToGUID(GUIDToStr(list_of_ints)) == list_of_ints

0 commit comments

Comments
 (0)