test: accept Paths in tmp_dir.gen()

This commit is contained in:
Alexander Schepanovski
2019-12-06 18:36:17 +01:00
parent 659eb04705
commit 5bec700761
+1 -1
View File
@@ -88,7 +88,7 @@ class TmpDir(pathlib.Path):
)
def gen(self, struct, text=""):
if isinstance(struct, basestring):
if isinstance(struct, (basestring, pathlib.PurePath)):
struct = {struct: text}
self._gen(struct)