From 0e19248d690eb7263c2ee31e0d5841bfea1889c6 Mon Sep 17 00:00:00 2001 From: Elias Müller Date: Sat, 9 Jul 2022 18:54:01 +0200 Subject: Use two blank lines between classes and functions --- tests/test_mpv.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests') 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): -- cgit