def test_default_exception_type(self):
        """
        dumps() TypeError in default() raises orjson.JSONEncodeError
        """
        ref = Custom()

        with pytest.raises(orjson.JSONEncodeError):
            orjson.dumps(ref, default=default_raises)

        dumps() TypeError in default() raises orjson.JSONEncodeError
        
test/test_default.py