diff options
author | skullydazed <skullydazed@users.noreply.github.com> | 2020-02-17 11:42:11 -0800 |
---|---|---|
committer | Drashna Jael're <drashna@live.com> | 2020-03-26 00:42:12 -0700 |
commit | 72b85f52e7227ca4f295e85206d4860853af8b87 (patch) | |
tree | 81222e5f55f4a71f13550dba4f1b629a67bd0224 /lib/python/qmk/tests/test_qmk_path.py | |
parent | 91d34ed5b74baa94090e4a5f39f3ebe3bd03316f (diff) |
Use pathlib everywhere we can (#7872)
* Use pathlib everywhere we can
* Update lib/python/qmk/path.py
Co-Authored-By: Erovia <Erovia@users.noreply.github.com>
* Update lib/python/qmk/path.py
Co-Authored-By: Erovia <Erovia@users.noreply.github.com>
* Improvements based on @erovia's feedback
* rework qmk compile and qmk flash to use pathlib
* style
* Remove the subcommand_name argument from find_keyboard_keymap()
Co-authored-by: Erovia <Erovia@users.noreply.github.com>
Diffstat (limited to 'lib/python/qmk/tests/test_qmk_path.py')
-rw-r--r-- | lib/python/qmk/tests/test_qmk_path.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/python/qmk/tests/test_qmk_path.py b/lib/python/qmk/tests/test_qmk_path.py index d6961a0f65..74db7b3e26 100644 --- a/lib/python/qmk/tests/test_qmk_path.py +++ b/lib/python/qmk/tests/test_qmk_path.py @@ -1,13 +1,14 @@ import os +from pathlib import Path import qmk.path def test_keymap_onekey_pytest(): path = qmk.path.keymap('handwired/onekey/pytest') - assert path == 'keyboards/handwired/onekey/keymaps' + assert path.samefile('keyboards/handwired/onekey/keymaps') def test_normpath(): path = qmk.path.normpath('lib/python') - assert path == os.path.join(os.environ['ORIG_CWD'], 'lib/python') + assert path.samefile(Path(os.environ['ORIG_CWD']) / 'lib/python') |