Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Implement Path.mkdir(parents=True) in wasm tests
  • Loading branch information
ianthomas23 committed Feb 18, 2026
commit 3b31aaffecd2fd193c35f31e1a212524c07eaf48
7 changes: 5 additions & 2 deletions test/conftest_wasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ def iterdir(self):
for f in filter(lambda f: f not in ['', '.', '..'], re.split(r"\r?\n", p.stdout)):
yield MockPath(self / f)

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

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