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

Use source_playfield.add_ball for ball_locks in multiball #1608

Merged
merged 1 commit into from
Oct 16, 2021

Conversation

cobra18t
Copy link
Collaborator

No description provided.

@sonarcloud
Copy link

sonarcloud bot commented Oct 14, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@jabdoa2
Copy link
Collaborator

jabdoa2 commented Oct 16, 2021

Good find. Thanks!

@jabdoa2 jabdoa2 merged commit 6e0c971 into missionpinball:dev Oct 16, 2021
@cobra18t
Copy link
Collaborator Author

cobra18t commented Nov 29, 2021

This PR is causing an error in the MPF Docs test...

mpf test game_logic/multiballs/multiball_with_traditional_ball_lock.rst 
Parsing documentation page
.F.
======================================================================
FAIL: test_config_parsing (mpf.tests.MpfDocTestCase.MpfDocTestCase)
Block 1 (starting at 0)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/mpf/tests/MpfDocTestCase.py", line 216, in test_config_parsing
    method(*parts)
AssertionError: KABOOM! We just added a ball to lockdevice which has a capacity of 2 but already had 2 ball(s)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/mpf/tests/MpfDocTestCase.py", line 218, in test_config_parsing
    raise AssertionError("Error in assertion {} (Num: {}) of your tests.".format(command, line_no)) from e
AssertionError: Error in assertion add_ball_to_device (Num: 23) of your tests.

----------------------------------------------------------------------
Ran 3 tests in 0.253s

FAILED (failures=1)

@cobra18t
Copy link
Collaborator Author

Not sure why that Docs test is failing. self.source_playfield.add_ball() does not seem to do anything in that test so the lock device is not unloading its balls. Maybe source_playfield is not properly defined in the test?

In an actual game that does this same sort of multiball, it works fine. I am not sure what is unique about this test versus a regular game. There are also similar test in the normal test_Multiball.py unit tests that pass without issue.

@cobra18t cobra18t deleted the patch-1 branch June 2, 2022 01:17
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