Use two blank lines between classes and functions
This commit is contained in:
parent
6a71ee0b9a
commit
0e19248d69
1 changed files with 6 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue