Skip to content

Commit 3b31aaf

Browse files
committed
Implement Path.mkdir(parents=True) in wasm tests
1 parent 588773f commit 3b31aaf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/conftest_wasm.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,11 @@ def iterdir(self):
8989
for f in filter(lambda f: f not in ['', '.', '..'], re.split(r"\r?\n", p.stdout)):
9090
yield MockPath(self / f)
9191

92-
def mkdir(self):
93-
subprocess.run(["mkdir", str(self)], capture_output=True, text=True, check=True)
92+
def mkdir(self, *, parents=False):
93+
args = [str(self)]
94+
if parents:
95+
args.append("-p")
96+
subprocess.run(["mkdir"] + args, capture_output=True, text=True, check=True)
9497

9598
def read_text(self) -> str:
9699
p = subprocess.run(["cat", str(self)], capture_output=True, text=True, check=True)

0 commit comments

Comments
 (0)