diff options
| author | 2025-10-14 00:23:10 -0400 | |
|---|---|---|
| committer | 2025-10-14 00:23:10 -0400 | |
| commit | 33f8a8a37a9cba738ef25fb99955f0730da9eb48 (patch) | |
| tree | b51fb48b160f5e5e034e6b4542e6f00703bae7ec /test | |
| parent | bbe7fac03d881662a458e7fbf870c9d71f5257f4 (diff) | |
New upstream version 1.30.10.upstream/1.30.10
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_postprocessor.py | 8 | ||||
| -rw-r--r-- | test/test_results.py | 1 | ||||
| -rw-r--r-- | test/test_text.py | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/test/test_postprocessor.py b/test/test_postprocessor.py index 17b36b6..5d52e1d 100644 --- a/test/test_postprocessor.py +++ b/test/test_postprocessor.py @@ -195,7 +195,8 @@ class ExecTest(BasePostprocessorTest): def test_command_string(self): self._create({ - "command": "echo {} {_path} {_directory} {_filename} && rm {};", + "command": "echo {} {_path} {_temppath} {_directory} {_filename} " + "&& rm {};", }) with patch("gallery_dl.util.Popen") as p: @@ -208,6 +209,7 @@ class ExecTest(BasePostprocessorTest): (f"echo " f"{self.pathfmt.realpath} " f"{self.pathfmt.realpath} " + f"{self.pathfmt.temppath} " f"{self.pathfmt.realdirectory} " f"{self.pathfmt.filename} " f"&& rm {self.pathfmt.realpath};"), @@ -243,7 +245,8 @@ class ExecTest(BasePostprocessorTest): def test_command_many(self): self._create({ "commands": [ - "echo {} {_path} {_directory} {_filename} && rm {};", + "echo {} {_path} {_temppath} {_directory} {_filename} " + "&& rm {};", ["~/script.sh", "{category}", "\fE _directory.upper()"], ] }) @@ -259,6 +262,7 @@ class ExecTest(BasePostprocessorTest): (f"echo " f"{self.pathfmt.realpath} " f"{self.pathfmt.realpath} " + f"{self.pathfmt.temppath} " f"{self.pathfmt.realdirectory} " f"{self.pathfmt.filename} " f"&& rm {self.pathfmt.realpath};"), diff --git a/test/test_results.py b/test/test_results.py index 2e2eaa9..e7fcabf 100644 --- a/test/test_results.py +++ b/test/test_results.py @@ -53,6 +53,7 @@ AUTH_REQUIRED = { "fantia", "instagram", "twitter", + "poipiku", } AUTH_KEYS = ( diff --git a/test/test_text.py b/test/test_text.py index 13029d2..0e187d7 100644 --- a/test/test_text.py +++ b/test/test_text.py @@ -459,11 +459,15 @@ class TestText(unittest.TestCase): # missing value self.assertEqual(f("bar"), {}) self.assertEqual(f("bar="), {"bar": ""}) + self.assertEqual(f("bar", empty=True), {"bar": ""}) self.assertEqual(f("foo=1&bar"), {"foo": "1"}) self.assertEqual(f("foo=1&bar="), {"foo": "1", "bar": ""}) + self.assertEqual(f("foo=1&bar", True), {"foo": "1", "bar": ""}) self.assertEqual(f("foo=1&bar&baz=3"), {"foo": "1", "baz": "3"}) self.assertEqual(f("foo=1&bar=&baz=3"), {"foo": "1", "bar": "", "baz": "3"}) + self.assertEqual(f("foo=1&bar&baz=3", True), + {"foo": "1", "bar": "", "baz": "3"}) # keys with identical names self.assertEqual(f("foo=1&foo=2"), {"foo": "1"}) |
