Unittest failure, need help to understand #165
Unanswered
worldpeace-germany
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I think herein lines your issue. The test is using virtual to run it (I
believe smart virtual, which relies on virtual for most things). In virtual
when it instaitates a segment display it has the following init that sets
flashing to No_Flash.
https://github.com/missionpinball/mpf/blob/e3929487b272e495a062d65bda242c9232afb49b/mpf/platforms/virtual.py#L368
Regardless of what was set in the config, virtual will always set it to no
flash. I assume that other platforms will have their own value. So not_set
isn't saying that it's not set, but rather that MPF is not going to set it,
the platform will set it. I'm sure there is more to it in the weeds for why
that test gives that error, but that is the highest level answer I could
see.
…On Thu, Feb 27, 2025 at 3:50 PM worldpeace-germany ***@***.***> wrote:
Hello,
I am running this unit test
python3.11 -m unittest
test_SegmentDisplay.TestSegmentDisplay.test_transitions_with_player
taking the code without modifications. The test passes. Now in the config
spec yaml for flashing the default value is "not_set"
https://github.com/missionpinball/mpf/blob/dev/mpf/config_spec.yaml#L1504
I don't understand the value "not_set" (but that is a different question,
but feel free to share insights if you do). I believe if nothing is
specified the flashing should be off. So please change in that config yaml
the not_set default value to off. Now run the above test again.
Now that test fails with
AssertionError: Calls not found.
I cannot see in the code anywhere where the not_set value is actually
being used and wondering why that test is failing now. Anyone an idea? Is
the test correct and should fail? If yes, because of what? Or is the test
somehow buggy and what would we have to change with that test?
Thanks!
—
Reply to this email directly, view it on GitHub
<#165>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AORJRKIJGOJNTJ76XAXQ3GL2R6CDFAVCNFSM6AAAAABYA4FY3SVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGAZDEMRVGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am running this unit test
python3.11 -m unittest test_SegmentDisplay.TestSegmentDisplay.test_transitions_with_player
taking the code without modifications. The test passes. Now in the config spec yaml for flashing the default value is "not_set"
https://github.com/missionpinball/mpf/blob/dev/mpf/config_spec.yaml#L1504
I don't understand the value "not_set" (but that is a different question, but feel free to share insights if you do). I believe if nothing is specified the flashing should be off. So please change in that config yaml the not_set default value to off. Now run the above test again.
Now that test fails with
AssertionError: Calls not found.
I cannot see in the code anywhere where the not_set value is actually being used and wondering why that test is failing now. Anyone an idea? Is the test correct and should fail? If yes, because of what? Or is the test somehow buggy and what would we have to change with that test?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions