Skip to content

[FR] Make tests for ukbot.py #81

@DiFronzo

Description

@DiFronzo

Is your feature request related to a problem? Please describe.
There are currently no automated tests for ukbot.py, making it difficult to ensure that the main entry point, argument parsing, logging setup, and overall orchestration of the bot work as intended and to catch regressions during development.

Describe 1~3 use cases of the purposed feature

  • Verify that the command-line interface correctly parses arguments and triggers the appropriate actions, such as running a contest, uploading plots, or simulating output.
  • Ensure that logging is configured as expected and that log messages are produced at the correct levels for both normal and verbose modes.
  • Confirm that error handling for invalid contest pages, configuration issues, and runtime exceptions works as intended and provides useful feedback.

Describe alternatives you've considered

  • Relying on manual testing or indirect coverage through higher-level tests, but this does not guarantee that all code paths in ukbot.py are exercised.
  • Adding only integration tests, which may not catch issues specific to the main application logic, argument parsing, or logging setup.

Additional context
Unit tests for ukbot.py will help maintain code quality and reliability. Tests could be implemented using pytest or unittest, and should cover both typical and edge-case usage of the main entry point, argument parsing, and orchestration logic.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions