From 695d97e103464532ad457a9d0c0067d75b767539 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 24 Feb 2025 16:53:41 +0100 Subject: [PATCH] fix: "no new line character at the end of file" If yamllint is installed `fdroid lint` will run it, and what will output the (new-line-at-end-of-file) warning message. --- tests/test_lint.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_lint.py b/tests/test_lint.py index 4056b2a6..89186676 100755 --- a/tests/test_lint.py +++ b/tests/test_lint.py @@ -345,7 +345,7 @@ class LintTest(unittest.TestCase): def test_check_categories_from_config_yml(self): """In config.yml, categories is a list.""" os.chdir(self.testdir) - Path('config.yml').write_text('categories: [foo, bar]') + Path('config.yml').write_text('categories: [foo, bar]\n') fdroidserver.lint.config = fdroidserver.common.read_config() fdroidserver.lint.load_categories_config() self.assertEqual(fdroidserver.lint.CATEGORIES_KEYS, ['foo', 'bar']) @@ -435,13 +435,13 @@ class LintTest(unittest.TestCase): def test_lint_invalid_config_keys(self): os.chdir(self.testdir) Path('config').mkdir() - Path('config/config.yml').write_text('repo:\n invalid_key: test') + Path('config/config.yml').write_text('repo:\n invalid_key: test\n') self.assertFalse(fdroidserver.lint.lint_config('config/config.yml')) def test_lint_invalid_localized_config_keys(self): os.chdir(self.testdir) Path('config/en').mkdir(parents=True) - Path('config/en/antiFeatures.yml').write_text('NonFreeNet:\n icon: test.png') + Path('config/en/antiFeatures.yml').write_text('NonFreeNet:\n icon: test.png\n') self.assertFalse(fdroidserver.lint.lint_config('config/en/antiFeatures.yml')) def test_check_certificate_pinned_binaries_empty(self):