Stav 23.06.2026

This commit is contained in:
2026-06-23 15:20:56 +02:00
commit 6d91e83e8c
5670 changed files with 1145969 additions and 0 deletions
@@ -0,0 +1,25 @@
import unittest
class VideoTestCase(unittest.TestCase):
def test_video_unload(self):
# fix issue https://github.com/kivy/kivy/issues/2275
# AttributeError: 'NoneType' object has no attribute 'texture'
from kivy.uix.video import Video
from kivy.clock import Clock
from kivy.base import runTouchApp, stopTouchApp
from kivy import kivy_examples_dir
from os.path import join, dirname, abspath
source = abspath(join(kivy_examples_dir, "widgets", "cityCC0.mpg"))
video = Video(source=source, play=True)
Clock.schedule_once(lambda x: stopTouchApp(), 1)
def unload_video(video, position):
if position > 0.01:
video.unload()
Clock.schedule_once(lambda x: stopTouchApp(), 0.1)
video.bind(position=unload_video)
runTouchApp(video)