Skip to content

ISCC - Conformance Testing#

An application that claims ISCC conformance MUST pass all core functions from the ISCC conformance test suite. The test suite is available as JSON data on GitHub. Test data is structured as follows:

{
  "<function_name>": {
    "<test_name>": {
      "inputs": ["<value1>", "<value2>"],
      "outputs": ["value1>", "<value2>"]
      }
   }
}

Inputs that are expected to be raw bytes or byte-streams are embedded as HEX encoded strings in JSON and prefixed with stream: or bytes to support automated decoding during implementation testing.

Example

Byte-stream outputs in JSON test data:

"gen_data_code_v0": {
  "test_0000_two_bytes_64": {
    "inputs": [
      "stream:ff00",
      64
    ],
    "outputs": {
      "iscc": "GAAXL2XYM5BQIAZ3"
    }
  },
  ...

conformance_testdata() #

Yield tuples of test data.

Returns:

Type Description
Generator[Tuple[str, Callable, List[Any], List[Any]]]

Tuple with testdata (test_name, func_obj, inputs, outputs)

conformance_selftest() #

Run conformance tests.

Returns:

Type Description
bool

whether all tests passed