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

[YANG] Add an infrastructure to write pytest tests for the YANG model. #16

Closed
wants to merge 2 commits into from

Conversation

oleksandrivantsiv
Copy link
Owner

Why I did it

The existing JSON tests are limited and require a huge amount of copy-paste to provide good coverage. The Pytest provides an alternative way to implement the tests. The tests and more readable and human-friendly. They also give more flexibility in the testing of corner cases.

As an example, the CRM, DASH CRM, and SmartSwitch tests are converted to Pytest. The new tests are more compact and provide better coverage.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Add an infrastructure that allows to write model tests in Python.
Conver CRM, DASH CRM, and SmartSwitch tests to Pytest.

How to verify it

Build the YANG model package.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@oleksandrivantsiv oleksandrivantsiv changed the title Yang pytest [YANG] Add an infrastructure to write pytest tests for the YANG model. Jan 11, 2024
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