Skip to content

Commit 6be4096

Browse files
committed
Windows %p does upper case hex digits for some reason
1 parent 5519a67 commit 6be4096

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

apsw/tests/aiotest.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ async def atestStr(self, fw):
870870

871871
def get(x):
872872
# extracts the useful bit
873-
return re.match("<(.* at 0x[0-9a-f]+)>", x).group(1)
873+
return re.match("<(.* at 0x[0-9a-fA-F]+)>", x).group(1)
874874

875875
class Banana(apsw.Connection):
876876
pass
@@ -944,13 +944,13 @@ class BananaSession(apsw.Session):
944944
for sobj, aobj, async_run, klass_name in to_test:
945945
# sync object
946946
s = get(str(sobj))
947-
addr = f" at {hex(id(sobj))}"
947+
addr = f" at {hex(id(sobj))}".lower()
948948
self.assertNotIn(" object ", s)
949949
self.assertNotIn(tag_a, s)
950950
self.assertNotIn(tag_c, s)
951951
self.assertNotIn(tag_aw, s)
952952
self.assertStartsWith(s, klass_name)
953-
self.assertEndsWith(s, addr)
953+
self.assertEndsWith(s.lower(), addr)
954954

955955
# async object in event loop
956956
s = get(str(aobj))
@@ -960,7 +960,7 @@ class BananaSession(apsw.Session):
960960
self.assertNotIn(tag_c, s)
961961
self.assertNotIn(tag_aw, s)
962962
self.assertStartsWith(s, klass_name)
963-
self.assertEndsWith(s, addr)
963+
self.assertEndsWith(s.lower(), addr)
964964

965965
# async object in worker thread
966966
s = get(await async_run(lambda: str(aobj)))
@@ -970,7 +970,7 @@ class BananaSession(apsw.Session):
970970
self.assertNotIn(tag_c, s)
971971
self.assertIn(tag_aw, s)
972972
self.assertStartsWith(s, klass_name)
973-
self.assertEndsWith(s, addr)
973+
self.assertEndsWith(s.lower(), addr)
974974

975975
# after closing
976976
sobj.close()
@@ -981,7 +981,7 @@ class BananaSession(apsw.Session):
981981
self.assertIn(tag_c, s)
982982
self.assertNotIn(tag_aw, s)
983983
self.assertStartsWith(s, klass_name)
984-
self.assertEndsWith(s, addr)
984+
self.assertEndsWith(s.lower(), addr)
985985

986986
aobj.close()
987987
s = get(str(aobj))
@@ -991,7 +991,7 @@ class BananaSession(apsw.Session):
991991
self.assertIn(tag_c, s)
992992
self.assertNotIn(tag_aw, s)
993993
self.assertStartsWith(s, klass_name)
994-
self.assertEndsWith(s, addr)
994+
self.assertEndsWith(s.lower(), addr)
995995

996996
# get unavailable database name due to mutex being held in another thread
997997
scon = apsw.Connection("")

0 commit comments

Comments
 (0)