blob: 11aa1fd55e31d514cdedeb1760ef74a573437deb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
from datetime import time, timezone
import pytest
import tomli_w
def test_invalid_type_nested():
with pytest.raises(TypeError):
tomli_w.dumps({"bytearr": bytearray()})
def test_invalid_time():
offset_time = time(23, 59, 59, tzinfo=timezone.utc)
with pytest.raises(ValueError):
tomli_w.dumps({"offset time": offset_time})
|