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

Update test suite #96

Merged
merged 14 commits into from
Jan 16, 2025
Merged

Update test suite #96

merged 14 commits into from
Jan 16, 2025

Conversation

erik-brink
Copy link
Collaborator

@erik-brink erik-brink commented Jan 8, 2025

Contents

This pull request includes significant updates to the testing configuration and test files, focusing on improving test setup and execution by introducing a custom configuration class and integrating it with existing tests.

Configuration Improvements:

  • Added testpaths and addopts to pyproject.toml for better test discovery and stricter marker usage.

Custom Configuration Class:

  • Introduced CustomConfig class in tests/conftest.py to wrap pytest.Config and dynamically manage configuration attributes.
  • Added fixtures and helper functions in tests/conftest.py to support the custom configuration class and handle pytest configuration options.

Test File Updates:

  • Updated tests/test_conf_template.ini to include general and HCP-specific configuration sections.
  • Modified tests/test_hci.py and tests/test_hcp.py to utilize the new CustomConfig class for accessing configuration settings and HCP handler instances. [1] [2]

This update is:

  • MAJOR - when you make incompatible API changes
  • MINOR - when you add functionality in a backwards compatible manner
  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

Test Procedure

Installation and initiation

pip install NGPIris

Tests

Tests can as of right now, only be performed using pytest on a local instance of Iris. CI/CD for this is currently possible.

Expected outcome:

PyTest resolves without crashes

Confirmations:

@erik-brink erik-brink requested a review from sylvinite January 8, 2025 14:40
@erik-brink erik-brink self-assigned this Jan 8, 2025
@erik-brink erik-brink changed the title Dev update tests Update test suite Jan 9, 2025
@erik-brink erik-brink mentioned this pull request Jan 9, 2025
4 tasks
@erik-brink erik-brink marked this pull request as ready for review January 15, 2025 09:05
Copy link
Member

@sylvinite sylvinite left a comment

Choose a reason for hiding this comment

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

See comments. Consider also adding tests to evaluate Port availability

tests/test_hcp.py Show resolved Hide resolved
tests/test_hcp.py Show resolved Hide resolved
tests/test_hcp.py Outdated Show resolved Hide resolved
@erik-brink erik-brink merged commit fe06490 into dev Jan 16, 2025
1 check passed
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.

2 participants