These are the doctests that are present in the module, originally in
src/lib.rs. They are manually extracted until I've figured out why `pytest
--doctest-modules` does not use them.

>>> from cbor_diag import *
>>> diag = '{1: "hello"}'
>>> encoded = diag2cbor(diag)
>>> encoded.hex()
'a1016568656c6c6f'
>>> import cbor2
>>> cbor2.loads(encoded)
{1: 'hello'}
>>> cbor2.loads(diag2cbor("[1, spam'eggs']", to999=True))
[1, CBORTag(999, ['spam', 'eggs'])]
>>> diag2cbor("1, 2, 3", seq=True)
b'\x01\x02\x03'
>>> from cbor_diag import *
>>> encoded = bytes.fromhex('a1016568656c6c6f')
>>> cbor2diag(encoded)
'{1: "hello"}'
>>> encoded = bytes.fromhex("c105")
>>> cbor2diag(encoded)
"DT'1970-01-01T00:00:05+00:00'"
>>> cbor2diag(encoded, pretty=False)
'1(5)'
>>> cbor2diag(cbor2.dumps([1, 2]), pretty=False)
'[1,2]'
>>> some_byte_ascii = cbor2.dumps(["foo", b"foo", b"f\xff\xff"])
>>> print(cbor2diag(some_byte_ascii))
["foo", 'foo', h'66ffff']
>>> print(cbor2diag(some_byte_ascii, pretty=False))
["foo",h'666f6f',h'66ffff']
>>> print(cbor2diag(b'\x01\x02\x03', seq=True))
1,
2,
3
<BLANKLINE>
>>> cbor2diag(bytes.fromhex("d9 03e7 82 63 666f6f 63 626172"), from999=True)
"foo'bar'"
>>> full = cbor2.dumps({"hello": "world"})
>>> partial = full[:10]
>>> print(cbor2diag(partial, incomplete=True))
{"hello": "wo" + ...}
>>> print(cbor2diag(cbor2.dumps({4:5}), unwrapped=601))
{4/ exp /: dt'1970-01-01T00:00:05+00:00'}
