mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-01 18:37:42 -05:00
pep8 corrections
This commit is contained in:
@@ -134,7 +134,7 @@ class TestAttributes(TestCase):
|
||||
)
|
||||
|
||||
|
||||
class Permutations(TestCase):
|
||||
class TestFieldPermutations(TestCase):
|
||||
|
||||
valid_dates = (
|
||||
"20150102030405Z",
|
||||
@@ -305,13 +305,28 @@ class Permutations(TestCase):
|
||||
|
||||
|
||||
class TestOCR(TestCase):
|
||||
|
||||
text_cases = [
|
||||
("simple string", "simple string"),
|
||||
("simple newline\n testing string", "simple newline\ntesting string"),
|
||||
("utf-8 строка с пробелами в конце ", "utf-8 строка с пробелами в конце")
|
||||
(
|
||||
"simple newline\n testing string",
|
||||
"simple newline\ntesting string"
|
||||
),
|
||||
(
|
||||
"utf-8 строка с пробелами в конце ",
|
||||
"utf-8 строка с пробелами в конце"
|
||||
)
|
||||
]
|
||||
|
||||
def test_strip_excess_whitespace(self):
|
||||
for source, result in self.text_cases:
|
||||
actual_result = strip_excess_whitespace(source)
|
||||
assert result == actual_result, "strip_exceess_whitespace(%s) != '%s', but '%s'" % (source, result, actual_result)
|
||||
self.assertEqual(
|
||||
result,
|
||||
actual_result,
|
||||
"strip_exceess_whitespace({}) != '{}', but '{}'".format(
|
||||
source,
|
||||
result,
|
||||
actual_result
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user