diff options
author | Elias Müller <elias.mr1@gmail.com> | 2022-07-09 18:54:01 +0200 |
---|---|---|
committer | jaseg <136313+jaseg@users.noreply.github.com> | 2022-07-11 12:44:47 +0200 |
commit | 0e19248d690eb7263c2ee31e0d5841bfea1889c6 (patch) | |
tree | 693d976329f169d7cc8e2a7afbfb50226eaf292c /tests | |
parent | 6a71ee0b9afbb54094aa3da6bab2b5d32eced9ca (diff) | |
download | python-mpv-0e19248d690eb7263c2ee31e0d5841bfea1889c6.tar.gz python-mpv-0e19248d690eb7263c2ee31e0d5841bfea1889c6.tar.bz2 python-mpv-0e19248d690eb7263c2ee31e0d5841bfea1889c6.zip |
Use two blank lines between classes and functions
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_mpv.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_mpv.py b/tests/test_mpv.py index 573919c..bfd882c 100755 --- a/tests/test_mpv.py +++ b/tests/test_mpv.py @@ -43,12 +43,14 @@ TESTVID = os.path.join(os.path.dirname(__file__), 'test.webm') 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 ] + def timed_print(): start_time = time.time() def do_print(level, prefix, text): td = time.time() - start_time print('{:.3f} [{}] {}: {}'.format(td, level, prefix, text), flush=True) + class MpvTestCase(unittest.TestCase): def setUp(self): self.disp = Xvfb() @@ -59,6 +61,7 @@ class MpvTestCase(unittest.TestCase): self.m.terminate() self.disp.stop() + class TestProperties(MpvTestCase): @contextmanager def swallow_mpv_errors(self, exception_exceptions=[]): @@ -288,6 +291,7 @@ class ObservePropertyTest(MpvTestCase): mock.call('slang', ['ru'])], any_order=True) + class KeyBindingTest(MpvTestCase): def test_register_direct_cmd(self): self.m.register_key_binding('a', 'playlist-clear') @@ -434,6 +438,7 @@ class KeyBindingTest(MpvTestCase): handler1.assert_has_calls([]) handler2.assert_has_calls([ mock.call() ]) + class TestStreams(unittest.TestCase): def test_python_stream(self): handler = mock.Mock() @@ -529,6 +534,7 @@ class TestStreams(unittest.TestCase): m.terminate() disp.stop() + class TestLifecycle(unittest.TestCase): def test_create_destroy(self): thread_names = lambda: [ t.name for t in threading.enumerate() ] @@ -756,7 +762,6 @@ class CommandTests(MpvTestCase): callback.assert_any_call(None, None) - class RegressionTests(MpvTestCase): def test_unobserve_property_runtime_error(self): |