comet.test

The comet.test module provides test handling functionality

Methods

comet.test.getDefinitionFile()

Return the path to the currently connected test pool definition file.

Returns:

The path to the current test pool file.

Return type:

str

Available:

InDesign®

CScript:

test::get_definition_file

comet.test.getDefaultDefinitionFile()

Return the path to the default test pool definition file.

Returns:

The path to the default test pool file.

Return type:

str

Available:

InDesign®

CScript:

test::get_default_definition_file

comet.test.connect(path)

Connect to a test definition file.

Parameters:

path (str) – The full path to the definition file to connect to.

Return type:

None

Raises:
Available:

InDesign®

CScript:

test::connect

comet.test.disconnect()

Disconnect from the current test definition file.

Return type:

None

Available:

InDesign®

CScript:

test::disconnect

comet.test.execute(path)

Execution of Comet tests. Proof data must first be generated for the tests that are to be executed.

Parameters:

path (str) – Specifies the path in the test hierarchy. If the path points to a domain, all tests below it will be executed.

Return type:

None

Raises:

CometError – On internal error.

Available:

InDesign®

CScript:

test::execute

comet.test.createProofs(path)

Proof creation for comet tests. Any existing proof data will be overwritten.

Parameters:

path (str) – Specifies the path in the test hierarchy. If the path points to a domain, proof data for all tests below will be created.

Return type:

None

Raises:

CometError – On internal error.

Available:

InDesign®

CScript:

test::create_proofs

comet.test.deleteProofs(path)

Proof deletion for comet tests.

Parameters:

path (str) – Specifies the path in the test hierarchy. If the path points to a domain, proof data for all tests below will be deleted.

Return type:

None

Raises:

CometError – On internal error.

Available:

InDesign®

CScript:

test::delete_proofs

comet.test.deleteResults(path)

Result deletion for comet tests.

Parameters:

path (str) – Specifies the path in the test hierarchy. If the path points to a domain, proof data for all tests below will be deleted.

Return type:

None

Raises:

CometError – On internal error.

Available:

InDesign®

CScript:

test::delete_test_results

comet.test.assertion(success=True, message='')

Set the assertion error state of the currently running assert test.

Parameters:
  • success (bool) –

    Whether the test is considered successful.

    • True: Test is successful.

    • False: Test has failed.

  • message (str) – Message to display in the panel when success is False.

Return type:

None

Raises:

CometError – On internal error.

Available:

InDesign®

CScript:

test::assert