pep8-e302: two blank lines between functions

This commit is contained in:
cneud 2025-03-25 22:36:22 +01:00
parent caf0fbe90f
commit fa7bb63481
11 changed files with 25 additions and 0 deletions

View file

@ -10,12 +10,14 @@ from unittest import TestCase as VanillaTestCase, skip, main as unittests_main
import pytest
from ocrd_utils import disableLogging, initLogging
def main(fn=None):
if fn:
sys.exit(pytest.main([fn]))
else:
unittests_main()
class TestCase(VanillaTestCase):
@classmethod
@ -26,6 +28,7 @@ class TestCase(VanillaTestCase):
disableLogging()
initLogging()
class CapturingTestCase(TestCase):
"""
A TestCase that needs to capture stderr/stdout and invoke click CLI.

View file

@ -1,6 +1,7 @@
from tests.base import main
from eynollah.utils.counter import EynollahIdCounter
def test_counter_string():
c = EynollahIdCounter()
assert c.next_region_id == 'region_0001'
@ -11,6 +12,7 @@ def test_counter_string():
assert c.region_id(999) == 'region_0999'
assert c.line_id(999, 888) == 'region_0999_line_0888'
def test_counter_init():
c = EynollahIdCounter(region_idx=2)
assert c.get('region') == 2
@ -19,6 +21,7 @@ def test_counter_init():
c.reset()
assert c.get('region') == 2
def test_counter_methods():
c = EynollahIdCounter()
assert c.get('region') == 0
@ -29,5 +32,6 @@ def test_counter_methods():
c.inc('region', -9)
assert c.get('region') == 1
if __name__ == '__main__':
main(__file__)