Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp unit tests #182

Open
neithere opened this issue Sep 3, 2023 · 0 comments
Open

Revamp unit tests #182

neithere opened this issue Sep 3, 2023 · 0 comments
Assignees
Milestone

Comments

@neithere
Copy link
Owner

neithere commented Sep 3, 2023

Purpose

Make the future deep rearrangement of the code safe and easy.

Context

The increasingly common typing hints (#107) are changing the scope of Argh and making many things easier. Now it makes sense to rely on type hints and make type guessing (from defaults, choices, etc.) secondary or even optional/deprecated. This calls for a serious restructuring of the code. We'll want to test the following transformations separately:

  1. building arg definitions from function signature (including type hints);
  2. augmenting signature-derived argh definitions from the @arg decorator;
  3. augmenting these further by guessing types from defaults/options when hints or explicit type aren't present;
  4. processing return value, potentially according to typing hints (probably going through a deprecation cycle with the current solution + adding some hooks for custom handlers);
  5. assembling multiple commands into parser(s).

Acceptance criteria

  • only public methods are tested; tests for private methods, if still relevant, are moved to public ones.
  • add more coverage on higher level, with actual use cases

Scope

In scope:

  • rearranging existing unit tests;
  • possibly increasing top-level coverage of currently supported cases.

Out of scope:

  • rearranging the code itself;
  • writing unit tests for future layers/components.
@neithere neithere self-assigned this Sep 3, 2023
@neithere neithere added this to the 1.0 milestone Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant