def test_bigint(self): self.assertEqual(earl.pack(1200), bytes([131, 98, 0, 0, 4, 176]))
def test_nil(self): self.assertEqual(earl.pack([]), bytes([131, 106]))
def test_smallint(self): self.assertEqual(earl.pack(10), bytes([131, 97, 10]))
def test_map(self): self.assertEqual( earl.pack({"d": 10}), bytes([131, 116, 0, 0, 0, 1, 109, 0, 0, 0, 1, 100, 97, 10]))
def test_list(self): self.assertEqual( earl.pack([1, 2, 3]), bytes([131, 108, 0, 0, 0, 3, 97, 1, 97, 2, 97, 3, 106]))
def test_floats(self): self.assertEqual(earl.pack(3.141592), bytes([131, 70, 64, 9, 33, 250, 252, 139, 0, 122]))
def encode_etf(payload) -> str: return earl.pack(payload)
def encode(obj): return pack(obj)
def _dumper(data: dict): return earl.pack(data)
async def etf_encoder(obj): return earl.pack(obj)