Skip to content

Add unit tests for Attribute module#597

Open
vipul-09 wants to merge 1 commit into
FOSSEE:masterfrom
vipul-09:pr-attribute-tests-clean
Open

Add unit tests for Attribute module#597
vipul-09 wants to merge 1 commit into
FOSSEE:masterfrom
vipul-09:pr-attribute-tests-clean

Conversation

@vipul-09

Copy link
Copy Markdown

Related Issues

Improves test coverage for the schematic converter by adding automated unit tests for the attribute.py module. These tests help ensure that attribute parsing and output generation behave correctly and provide a foundation for future regression testing.

Purpose

The main objective is to improve the test coverage of the schematic converter by adding automated unit tests for the Attribute module. These tests verify correct parsing of PSpice attributes and generation of KiCad-compatible output, helping detect regressions during future development.

Approach

Created a pytest-based test suite under:

unit_tests/test_attribute.py

The following functionality is covered:

Parsing attribute name and value
Parsing attribute coordinates
Parsing orientation, horizontal justification, and vertical justification
Detecting hidden attributes
Verifying generated output from Attribute.print()
Verifying printed value
Verifying printed orientation
Verifying printed coordinates
Verifying hidden flag output
Verifying justification formatting

All tests were executed using pytest and pass successfully.

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.

1 participant