Skip to content

Commit

Permalink
Fixed test failures on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Jan 16, 2024
1 parent 7c6e647 commit ed997ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_decoder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import math
import platform
import re
import struct
import sys
Expand Down Expand Up @@ -490,7 +491,8 @@ def test_datetime_date_out_of_range(impl):
with pytest.raises(impl.CBORDecodeError) as excinfo:
impl.loads(unhexlify("a6c11b00002401001b000000000000ff00"))

assert isinstance(excinfo.value.__cause__, ValueError)
cause_exc_class = OSError if platform.system() == "Windows" else ValueError
assert isinstance(excinfo.value.__cause__, cause_exc_class)


def test_datetime_timezone(impl):
Expand Down

0 comments on commit ed997ac

Please sign in to comment.