Open
Conversation
Collaborator
Author
|
Test is failing due to using the calculated pins, rather than the supplied pin_list def test_jig_driver_with_unknown_pins():
handler1 = AddressHandler(("x0",))
handler2 = AddressHandler(("x2",))
handler3 = AddressHandler(("x1",))
class Mux(VirtualMux):
pin_list = ("x0", "x1") # "x1" isn't in either handler
map_list = ("sig1", "x1")
class Group(MuxGroup):
def __init__(self):
self.mux = Mux()
# This is O.K., because all the pins are included
JigDriver(Group, [handler1, handler2, handler3])
# ^ test is failing here due to VirtualMux._validate, since self._pin_set is incorrect
with pytest.raises(ValueError):
# This should raise, because no handler implements "x1"
JigDriver(Group, [handler1, handler2])expected output for mux pins After switching back to main it looks like this test passes, but never produced a useable mux. There isn't a great way to type this. Maybe we should enforce Sequence[tuple[str,...]] |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Remove requirement to have both pin_list and pin_map which had issues in the new switching module if pins were missing from the list.
Add check that pins are unique across muxes.