[pp:directory] add 'directory' post processor (#7432)

This commit is contained in:
Mike Fährmann
2025-04-27 22:05:35 +02:00
parent 7386cb78bc
commit 9b43a3677e
4 changed files with 64 additions and 0 deletions

View File

@@ -173,6 +173,24 @@ class ClassifyTest(BasePostprocessorTest):
self.assertEqual(self.pathfmt.realpath, path + "/file.foo")
class DirectoryTest(BasePostprocessorTest):
def test_default(self):
self._create()
path = os.path.join(self.dir.name, "test")
self.assertEqual(self.pathfmt.realdirectory, path + "/")
self.assertEqual(self.pathfmt.realpath, path + "/file.ext")
self.pathfmt.kwdict["category"] = "custom"
self._trigger()
path = os.path.join(self.dir.name, "custom")
self.assertEqual(self.pathfmt.realdirectory, path + "/")
self.pathfmt.build_path()
self.assertEqual(self.pathfmt.realpath, path + "/file.ext")
class ExecTest(BasePostprocessorTest):
def test_command_string(self):