Skip unreliable test in CI
This commit is contained in:
parent
fcd2c354ae
commit
b12203d2d2
2 changed files with 22 additions and 18 deletions
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
|
@ -20,6 +20,8 @@ jobs:
|
||||||
name: 'Python'
|
name: 'Python'
|
||||||
env:
|
env:
|
||||||
DISPLAY: :0
|
DISPLAY: :0
|
||||||
|
PY_MPV_SKIP_TESTS: >-
|
||||||
|
test_wait_for_property_event_overflow
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: 'Install Python'
|
- name: 'Install Python'
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ else:
|
||||||
TESTVID = os.path.join(os.path.dirname(__file__), 'test.webm')
|
TESTVID = os.path.join(os.path.dirname(__file__), 'test.webm')
|
||||||
TESTSRT = os.path.join(os.path.dirname(__file__), 'sub_test.srt')
|
TESTSRT = os.path.join(os.path.dirname(__file__), 'sub_test.srt')
|
||||||
MPV_ERRORS = [ l(ec) for ec, l in mpv.ErrorCode.EXCEPTION_DICT.items() if l ]
|
MPV_ERRORS = [ l(ec) for ec, l in mpv.ErrorCode.EXCEPTION_DICT.items() if l ]
|
||||||
|
SKIP_TESTS = os.environ.get('PY_MPV_SKIP_TESTS', '').split()
|
||||||
|
|
||||||
|
|
||||||
def timed_print():
|
def timed_print():
|
||||||
|
|
@ -656,24 +657,25 @@ class TestLifecycle(unittest.TestCase):
|
||||||
m.terminate()
|
m.terminate()
|
||||||
self.disp.stop()
|
self.disp.stop()
|
||||||
|
|
||||||
# def test_wait_for_property_event_overflow(self):
|
@unittest.skipIf('test_wait_for_property_event_overflow' in SKIP_TESTS, reason="kills X-Server first")
|
||||||
# self.disp = Xvfb()
|
def test_wait_for_property_event_overflow(self):
|
||||||
# self.disp.start()
|
self.disp = Xvfb()
|
||||||
# m = mpv.MPV(vo=testvo)
|
self.disp.start()
|
||||||
# m.play(TESTVID)
|
m = mpv.MPV(vo=testvo)
|
||||||
# with self.assertRaises(mpv.EventOverflowError):
|
m.play(TESTVID)
|
||||||
# # level_sensitive=false needed to prevent get_property on dead
|
with self.assertRaises(mpv.EventOverflowError):
|
||||||
# # handle
|
# level_sensitive=false needed to prevent get_property on dead
|
||||||
# with m.prepare_and_wait_for_property('mute', cond=lambda val: time.sleep(0.001)):
|
# handle
|
||||||
# for i in range(10000):
|
with m.prepare_and_wait_for_property('mute', cond=lambda val: time.sleep(0.001)):
|
||||||
# try:
|
for i in range(10000):
|
||||||
# # We really have to try hard to fill up the queue here. Simple async commands will not work,
|
try:
|
||||||
# # since then command_async will throw a memory error first. Property changes also do not work,
|
# We really have to try hard to fill up the queue here. Simple async commands will not work,
|
||||||
# # since they are only processsed when the event loop is idle. This here works reliably.
|
# since then command_async will throw a memory error first. Property changes also do not work,
|
||||||
# m.command_async('script-message', 'foo', 'bar')
|
# since they are only processsed when the event loop is idle. This here works reliably.
|
||||||
# except:
|
m.command_async('script-message', 'foo', 'bar')
|
||||||
# pass
|
except:
|
||||||
# self.disp.stop()
|
pass
|
||||||
|
self.disp.stop()
|
||||||
|
|
||||||
def test_wait_for_event_shutdown(self):
|
def test_wait_for_event_shutdown(self):
|
||||||
self.disp = Xvfb()
|
self.disp = Xvfb()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue