summaryrefslogtreecommitdiff
path: root/lib/python/qmk/tests
diff options
context:
space:
mode:
authorDan McClain <dan@danmcclain.net>2019-10-07 14:32:30 -0400
committerFlorian Didron <fdidron@users.noreply.github.com>2019-11-04 16:51:03 +0900
commitbe4771380fe13aae243119a5863c6aff5f205346 (patch)
treee4fe61196e06ef6d7864f3f480aac7d321af6a8a /lib/python/qmk/tests
parent56dd8cfe48c7c8a2fa3962ea5bec5766d8346af5 (diff)
[CLI] Add `qmk list_keyboards` (#6927)
`list_keyboards` replicates the `make list-keyboards` by globbing for all paths that include `rules.mk` and then removing the paths that include `keymaps`. This basis of this cli command could be reused in the future as a util, but is not done so here since this would be the only place that would use it currently Resolves #6911
Diffstat (limited to 'lib/python/qmk/tests')
-rw-r--r--lib/python/qmk/tests/test_cli_commands.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py
index 2fc6e0f723..c9d632517b 100644
--- a/lib/python/qmk/tests/test_cli_commands.py
+++ b/lib/python/qmk/tests/test_cli_commands.py
@@ -37,3 +37,11 @@ def test_pyformat():
result = check_subcommand('pyformat')
assert result.returncode == 0
assert 'Successfully formatted the python code' in result.stderr
+
+
+def test_list_keyboards():
+ result = check_subcommand('list_keyboards')
+ assert result.returncode == 0
+ # check to see if a known keyboard is returned
+ # this will fail if handwired/onekey/pytest is removed
+ assert 'handwired/onekey/pytest' in result.stdout