From f00dbd9c943eb2b26d7899e4534ec0ca50ba30d8 Mon Sep 17 00:00:00 2001 From: Petr Pucil Date: Sun, 29 Sep 2024 16:21:12 +0200 Subject: [PATCH] Python: remove redundant newlines also from manually written specs By "manually written" I mean that there is no KST spec for these tests. --- spec/python/test_debug_0.py | 1 - spec/python/test_debug_array_user.py | 1 - spec/python/test_debug_enum_name.py | 1 - spec/python/test_opaque_external_type.py | 1 - spec/python/test_opaque_external_type_02_parent.py | 2 -- spec/python/test_opaque_with_param.py | 1 - spec/python/test_params_def.py | 1 - spec/python/test_str_literals.py | 2 -- spec/python/test_switch_cast.py | 1 - spec/python/test_to_string_custom.py | 1 - spec/python/test_type_ternary_opaque.py | 1 - 11 files changed, 13 deletions(-) diff --git a/spec/python/test_debug_0.py b/spec/python/test_debug_0.py index 6e2a96fd7..6a9da110d 100644 --- a/spec/python/test_debug_0.py +++ b/spec/python/test_debug_0.py @@ -1,5 +1,4 @@ import unittest - from debug_0 import Debug0 class TestDebug0(unittest.TestCase): diff --git a/spec/python/test_debug_array_user.py b/spec/python/test_debug_array_user.py index 48a4fa7be..b49edeab2 100644 --- a/spec/python/test_debug_array_user.py +++ b/spec/python/test_debug_array_user.py @@ -1,5 +1,4 @@ import unittest - from debug_array_user import DebugArrayUser class TestDebugArrayUser(unittest.TestCase): diff --git a/spec/python/test_debug_enum_name.py b/spec/python/test_debug_enum_name.py index 2421f2953..7e8430bc2 100644 --- a/spec/python/test_debug_enum_name.py +++ b/spec/python/test_debug_enum_name.py @@ -1,5 +1,4 @@ import unittest - from debug_enum_name import DebugEnumName class TestDebugEnumName(unittest.TestCase): diff --git a/spec/python/test_opaque_external_type.py b/spec/python/test_opaque_external_type.py index 42c460392..723839b19 100644 --- a/spec/python/test_opaque_external_type.py +++ b/spec/python/test_opaque_external_type.py @@ -1,5 +1,4 @@ import unittest - from opaque_external_type import OpaqueExternalType class TestOpaqueExternalType(unittest.TestCase): diff --git a/spec/python/test_opaque_external_type_02_parent.py b/spec/python/test_opaque_external_type_02_parent.py index 339ce9c94..bc79012e3 100644 --- a/spec/python/test_opaque_external_type_02_parent.py +++ b/spec/python/test_opaque_external_type_02_parent.py @@ -1,11 +1,9 @@ import unittest - from opaque_external_type_02_parent import OpaqueExternalType02Parent class TestOpaqueExternalType02Parent(unittest.TestCase): def test_opaque_external_type_02_parent(self): with OpaqueExternalType02Parent.from_file('src/term_strz.bin') as r: - self.assertEqual(r.parent.child.s1, u"foo") self.assertEqual(r.parent.child.s2, u"bar") self.assertEqual(r.parent.child.s3.s3, u"|baz@") diff --git a/spec/python/test_opaque_with_param.py b/spec/python/test_opaque_with_param.py index 1520a331c..12c805d41 100644 --- a/spec/python/test_opaque_with_param.py +++ b/spec/python/test_opaque_with_param.py @@ -1,5 +1,4 @@ import unittest - from opaque_with_param import OpaqueWithParam class TestOpaqueWithParam(unittest.TestCase): diff --git a/spec/python/test_params_def.py b/spec/python/test_params_def.py index 471546efa..eefa037f5 100644 --- a/spec/python/test_params_def.py +++ b/spec/python/test_params_def.py @@ -1,5 +1,4 @@ import unittest - from params_def import ParamsDef from kaitaistruct import KaitaiStream diff --git a/spec/python/test_str_literals.py b/spec/python/test_str_literals.py index f3cd1f450..7c3ea99bc 100644 --- a/spec/python/test_str_literals.py +++ b/spec/python/test_str_literals.py @@ -1,11 +1,9 @@ import unittest - from str_literals import StrLiterals class TestStrLiterals(unittest.TestCase): def test_str_literals(self): with StrLiterals.from_file('src/fixed_struct.bin') as r: - self.assertEqual(self.str_to_arr(r.complex_str), [0, 1, 2, 7, 8, 10, 13, 9, 11, 12, 27, 61, 7, 10, 36, 9787]) self.assertEqual(self.str_to_arr(r.double_quotes), [34, 34, 34]) self.assertEqual(self.str_to_arr(r.backslashes), [92, 92, 92]) diff --git a/spec/python/test_switch_cast.py b/spec/python/test_switch_cast.py index 8f9b3f3cf..bdf5a0f17 100644 --- a/spec/python/test_switch_cast.py +++ b/spec/python/test_switch_cast.py @@ -1,5 +1,4 @@ import unittest - from switch_cast import SwitchCast class TestSwitchCast(unittest.TestCase): diff --git a/spec/python/test_to_string_custom.py b/spec/python/test_to_string_custom.py index 9c17c6ae2..63a43d00f 100644 --- a/spec/python/test_to_string_custom.py +++ b/spec/python/test_to_string_custom.py @@ -1,5 +1,4 @@ import unittest - from to_string_custom import ToStringCustom class TestToStringCustom(unittest.TestCase): diff --git a/spec/python/test_type_ternary_opaque.py b/spec/python/test_type_ternary_opaque.py index 0e71732e0..403e332a6 100644 --- a/spec/python/test_type_ternary_opaque.py +++ b/spec/python/test_type_ternary_opaque.py @@ -1,5 +1,4 @@ import unittest - from type_ternary_opaque import TypeTernaryOpaque class TestTypeTernaryOpaque(unittest.TestCase):