mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-24 20:32:58 +00:00
c66930445f
* 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>
15 lines
340 B
Python
15 lines
340 B
Python
import os
|
|
from pathlib import Path
|
|
|
|
import qmk.path
|
|
|
|
|
|
def test_keymap_onekey_pytest():
|
|
path = qmk.path.keymap('handwired/onekey/pytest')
|
|
assert path.samefile('keyboards/handwired/onekey/keymaps')
|
|
|
|
|
|
def test_normpath():
|
|
path = qmk.path.normpath('lib/python')
|
|
assert path.samefile(Path(os.environ['ORIG_CWD']) / 'lib/python')
|