Skip to content

Commit ac332c4

Browse files
authored
Merge pull request #168 from cbrew/main
2 parents cc28d36 + e1b1102 commit ac332c4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

eyecite/utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ def hash_sha256(dictionary: dict) -> int:
122122
"""
123123

124124
# Convert the dictionary to a JSON string
125-
json_str: str = json.dumps(dictionary, sort_keys=True)
125+
# default needed because of dates
126+
json_str: str = json.dumps(dictionary, sort_keys=True, default=str)
126127

127128
# Convert the JSON string to bytes
128129
json_bytes: bytes = json_str.encode("utf-8")

tests/test_ResolveTest.py

+3
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ def checkResolution(
104104

105105
self.assertResolution(citations, expected_resolution_dict)
106106

107+
def test_issue_167(self):
108+
self.checkResolution((0, "25 Texas L.Rev. 199"))
109+
107110
def test_full_resolution(self):
108111
# Test resolving a single, full citation
109112
self.checkResolution(

0 commit comments

Comments
 (0)