From 52ae326ebb557612592cd8a0fcd08258f16b059f Mon Sep 17 00:00:00 2001 From: Werner Lewis Date: Wed, 14 Sep 2022 16:26:54 +0100 Subject: [PATCH] Update references to file targets in docstrings Signed-off-by: Werner Lewis --- scripts/mbedtls_dev/test_generation.py | 5 +++-- tests/scripts/generate_bignum_tests.py | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/mbedtls_dev/test_generation.py b/scripts/mbedtls_dev/test_generation.py index 87cb43ecd..c9a73c4ad 100644 --- a/scripts/mbedtls_dev/test_generation.py +++ b/scripts/mbedtls_dev/test_generation.py @@ -35,8 +35,9 @@ T = TypeVar('T') #pylint: disable=invalid-name class BaseTarget(metaclass=ABCMeta): """Base target for test case generation. - Derive directly from this class when adding new file Targets, setting - `target_basename`. + Child classes of this class represent an output file, and can be referred + to as file targets. These indicate where test cases will be written to for + all subclasses of the file target, which is set by `target_basename`. Attributes: count: Counter for test cases from this class. diff --git a/tests/scripts/generate_bignum_tests.py b/tests/scripts/generate_bignum_tests.py index d156f56f8..b4915d846 100755 --- a/tests/scripts/generate_bignum_tests.py +++ b/tests/scripts/generate_bignum_tests.py @@ -6,11 +6,11 @@ generate only the specified files. Class structure: -Child classes of test_generation.BaseTarget (file Targets) represent a target +Child classes of test_generation.BaseTarget (file targets) represent an output file. These indicate where test cases will be written to, for all subclasses of -this Target. Multiple Target classes should not reuse a `target_basename`. +this target. Multiple file targets should not reuse a `target_basename`. -Each subclass derived from a file Target can either be: +Each subclass derived from a file target can either be: - A concrete class, representing a test function, which generates test cases. - An abstract class containing shared methods and attributes, not associated with a test function. An example is BignumOperation, which provides @@ -24,7 +24,7 @@ from abstract and concrete classes). Adding test case generation for a function: A subclass representing the test function should be added, deriving from a -file Target such as BignumTarget. This test class must set/implement the +file target such as BignumTarget. This test class must set/implement the following: - test_function: the function name from the associated .function file. - test_name: a descriptive name or brief summary to refer to the test