-
Notifications
You must be signed in to change notification settings - Fork 1
Add test coverage #55
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
Closed
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
26a3c5a
Fix output ports to not have _oe signals
robtaylor 6583f69
Add comprehensive test suite for improved code coverage
robtaylor 184953f
Add comprehensive test suite for steps and software components
robtaylor c789ef3
Add comprehensive tests for pin_lock.py utilities
robtaylor 684678a
Fix SiliconPlatformPort class and add comprehensive tests
robtaylor 65b4de5
Fix warnings in test_instantiate_ports test
robtaylor 0cfcd61
Fix test_instantiate_ports_missing_clock to eliminate warnings
robtaylor b6566e0
Fix remaining warnings in test suite
robtaylor 974edd6
Fix all warnings in test suite
robtaylor 09e6177
Add specific test commands for silicon.py coverage
robtaylor 3706346
Add test for instantiate_ports with clocks and resets
robtaylor ce78785
Fix output ports to not have output enable signals (_oe)
robtaylor 3fef143
Rewrite skipped tests in test_pin_lock_complete.py for Pydantic models
robtaylor 77de7f8
Fix skipped test in test_pin_lock_complete.py using real Pydantic obj…
robtaylor 30dc546
Fix test_pin_lock_advanced.py to use correct Pydantic models
robtaylor f081653
Update tests to improve Pydantic compatibility
robtaylor ba133a2
Fix lint issues in test files
robtaylor 16b80e0
Fix lint issues in test_pin_lock_complete.py
robtaylor 592d51e
Fix lint issues in amaranth test files
robtaylor 73c3689
Fix lint issues in additional test files
robtaylor f53a43e
Refactor test_pin_lock.py to use Pydantic objects instead of mocks
robtaylor b77406b
Fix test_pin_lock.py by removing non-existent function import
robtaylor b8175d2
Fix test_pin_lock.py to use actual _QuadPackageDef instead of mock
robtaylor dc7687f
Add test for config.json content generated by SiliconStep.submit
robtaylor ca1d660
Update Process enum __str__ method to return the enum value instead o…
robtaylor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # SPDX-License-Identifier: BSD-2-Clause | ||
| import os | ||
| import unittest | ||
|
|
||
| from chipflow_lib.config import get_dir_models, get_dir_software | ||
|
|
||
|
|
||
| class TestConfig(unittest.TestCase): | ||
| def test_get_dir_models(self): | ||
| """Test get_dir_models returns the correct path""" | ||
| # Since we can't predict the absolute path, we'll check that it ends correctly | ||
| models_dir = get_dir_models() | ||
| self.assertTrue(models_dir.endswith("/chipflow_lib/models")) | ||
| self.assertTrue(os.path.isdir(models_dir)) | ||
|
|
||
| def test_get_dir_software(self): | ||
| """Test get_dir_software returns the correct path""" | ||
| # Since we can't predict the absolute path, we'll check that it ends correctly | ||
| software_dir = get_dir_software() | ||
| self.assertTrue(software_dir.endswith("/chipflow_lib/software")) | ||
| self.assertTrue(os.path.isdir(software_dir)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # SPDX-License-Identifier: BSD-2-Clause | ||
| import unittest | ||
|
|
||
| from chipflow_lib.errors import ChipFlowError | ||
|
|
||
|
|
||
| class TestErrors(unittest.TestCase): | ||
| def test_chipflow_error(self): | ||
| """Test that ChipFlowError can be instantiated and raised""" | ||
| # Test instantiation | ||
| error = ChipFlowError("Test error message") | ||
| self.assertEqual(str(error), "Test error message") | ||
|
|
||
| # Test raising | ||
| with self.assertRaises(ChipFlowError) as cm: | ||
| raise ChipFlowError("Test raised error") | ||
|
|
||
| self.assertEqual(str(cm.exception), "Test raised error") | ||
|
|
||
| # Test inheritance | ||
| self.assertTrue(issubclass(ChipFlowError, Exception)) | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.