aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_postprocessor.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-04-15 05:25:44 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2025-04-15 05:25:44 -0400
commit71c4f9dc93d81a2733a8ec8fe177e3db0e37d33b (patch)
tree284174b9244e04f24ef1fadc5a8ef6980e7b5559 /test/test_postprocessor.py
parentf13f90dc9ba67ad4a4a2b7a94d175186900b7d38 (diff)
parentb830dc03b3b7c9dd119648e1be9c1145d56e096c (diff)
Update upstream source from tag 'upstream/1.29.4'
Update to upstream version '1.29.4' with Debian dir a15c4baddb14f9fd81eb2888aeeba8d3406c73f4
Diffstat (limited to 'test/test_postprocessor.py')
-rw-r--r--test/test_postprocessor.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_postprocessor.py b/test/test_postprocessor.py
index 2941b81..8b073b4 100644
--- a/test/test_postprocessor.py
+++ b/test/test_postprocessor.py
@@ -511,6 +511,17 @@ class MetadataTest(BasePostprocessorTest):
path = self.pathfmt.realdirectory + "../json/12500/file.ext.json"
m.assert_called_once_with(path, "w", encoding="utf-8")
+ def test_metadata_directory_empty(self):
+ self._create(
+ {"directory": []},
+ )
+
+ with patch("builtins.open", mock_open()) as m:
+ self._trigger()
+
+ path = self.pathfmt.realdirectory + "./file.ext.json"
+ m.assert_called_once_with(path, "w", encoding="utf-8")
+
def test_metadata_basedirectory(self):
self._create({"base-directory": True})
@@ -544,6 +555,16 @@ class MetadataTest(BasePostprocessorTest):
path = self.pathfmt.realdirectory + "test_file__meta_.data"
m.assert_called_once_with(path, "w", encoding="utf-8")
+ def test_metadata_meta_path(self):
+ self._create({
+ "metadata-path": "_meta_path",
+ })
+
+ self._trigger()
+
+ self.assertEqual(self.pathfmt.kwdict["_meta_path"],
+ self.pathfmt.realpath + ".json")
+
def test_metadata_stdout(self):
self._create({"filename": "-", "indent": None, "sort": True})