Skip to content

Conversation

@briandelmsft
Copy link
Owner

@briandelmsft briandelmsft commented Jun 1, 2025

Adding some additional test cases to cover various areas such as class initializations, basic set/get functionality and coverage of some previously untested functions like exception handling in the rest get/set/post and file retrieval for various modules that store kql and other file content

Added more comprehensive doc strings to shared functions to make them easier to use

@briandelmsft briandelmsft requested review from Copilot and piaudonn June 1, 2025 03:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds additional tests to improve the test coverage of various modules including REST API responses and data processing functions. Key changes include:

  • New tests for REST response error handling using pytest.raises
  • Expanded test cases on data parsing functions covering empty, malformed, and edge-case inputs
  • Tests for file loading functions ensuring expected content retrieval

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/test_rest.py Added tests for verifying REST response handling with error checks
tests/test_data.py Multiple new tests covering data parsing, sorting, file loading, etc.
Comments suppressed due to low confidence (1)

tests/test_data.py:155

  • The expected behavior for handling missing keys in test_sort_list_by_key is not immediately clear. Consider adding a brief explanation in the test docstring to clarify how items with missing keys are intended to be sorted.
def test_sort_list_by_key():

@piaudonn piaudonn merged commit 6fb583f into main Jun 3, 2025
3 of 6 checks passed
@piaudonn piaudonn deleted the stat_additional_tests branch June 3, 2025 21:25
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

Successfully merging this pull request may close these issues.

Add detailed docstrings Improve test coverage

3 participants