Skip to content

nrunner: reorganization of unittests#5966

Merged
richtja merged 4 commits intoavocado-framework:masterfrom
clebergnu:unittest_nrunner_reorg
Jul 12, 2024
Merged

nrunner: reorganization of unittests#5966
richtja merged 4 commits intoavocado-framework:masterfrom
clebergnu:unittest_nrunner_reorg

Conversation

@clebergnu
Copy link
Copy Markdown
Contributor

There are some "blind spots" in the runnable code, such as when dealing with serialization from JSON files and Runnable's configuration.

To allow for a clearer view of the current coverage of Runnable's features, let's reorganize their tests in a file of its own, and based on the usage and where the data is coming from or going to.

@clebergnu clebergnu force-pushed the unittest_nrunner_reorg branch 3 times, most recently from f165220 to 597a771 Compare June 24, 2024 13:07
@clebergnu clebergnu marked this pull request as ready for review June 24, 2024 15:56
@clebergnu clebergnu requested review from harvey0100 and richtja June 24, 2024 15:56
Copy link
Copy Markdown
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @clebergnu, the overall changes LGTM. I have just one proposal about removing some tests, but we can merge it without it. And one proposal to commit format which would help me to finish the review.

@clebergnu clebergnu added this to the 107 - Codename TBD milestone Jul 2, 2024
@clebergnu clebergnu force-pushed the unittest_nrunner_reorg branch 2 times, most recently from a468d77 to 68f5f5e Compare July 10, 2024 10:52
@clebergnu clebergnu requested a review from richtja July 10, 2024 11:12
Copy link
Copy Markdown
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @clebergnu, thank you for your updates. I have one more comment to the runner_tap.py path. Please let me know what do you think.

The temp directory is being used simply to hold the content of
runnable recipes (JSON files) which are created by means of
Runnable.write_json().  But, Runnable.write_json() itself is
utter uninteresting, being simply a convenience around
Runnable.get_json().

Signed-off-by: Cleber Rosa <crosa@redhat.com>
This avoids some codepaths that can mock the loading of the JSON
schema, instead of the opening of the recipe file.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
There are some "blind spots" in the runnable code, such as when
dealing with serialization from JSON files and Runnable's
configuration.

To allow for a clearer view of the current coverage of Runnable's
features, let's reorganize their tests in a file of its own, and based
on the usage and where the data is coming from or going to.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
@clebergnu clebergnu force-pushed the unittest_nrunner_reorg branch from 68f5f5e to c97ca92 Compare July 12, 2024 08:15
@clebergnu clebergnu requested a review from richtja July 12, 2024 08:16
Copy link
Copy Markdown
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the changes it LGTM, thanks @clebergnu.

@richtja richtja merged commit 438b38f into avocado-framework:master Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants