This is a proposal to implement mkdir() in tbot.machine.linux.path.Path to conveniently create a directory using the shell command mkdir.
Tests were added/extended to assert reasonable behavior of the new method. In the process of writing the tests, a TODO was cleaned up (reasoning see commit message), and a new test that checks the behavior of the Path methods against regular files was added.
The mkdir method was equipped with exist_ok and parents parameters for compatibility to Python's native pathlib.Path.mdkir() method.
Updated branch after detecting that exists_ok (used in added method) is not the same as exist_ok (no second 's', as used in Python's native pathlib.mkdir()).
This is a proposal to implement
mkdir()
intbot.machine.linux.path.Path
to conveniently create a directory using the shell commandmkdir
.Tests were added/extended to assert reasonable behavior of the new method. In the process of writing the tests, a TODO was cleaned up (reasoning see commit message), and a new test that checks the behavior of the Path methods against regular files was added.
The
mkdir
method was equipped withexist_ok
andparents
parameters for compatibility to Python's nativepathlib.Path.mdkir()
method.