Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
topydo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
topydo
Commits
02529bdf
Commit
02529bdf
authored
Jan 25, 2016
by
Jacek Sowiński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for the keymap related utility function
parent
05575871
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
test/test_utils.py
test/test_utils.py
+36
-0
No files found.
test/test_utils.py
0 → 100644
View file @
02529bdf
# Topydo - A todo.txt client written in Python.
# Copyright (C) 2014 - 2015 Bram Schoenmakers <me@bramschoenmakers.nl>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
from
test.topydo_testcase
import
TopydoTest
from
topydo.lib.Utils
import
translate_key_to_config
class
UtilsTest
(
TopydoTest
):
def
test_key_to_cfg
(
self
):
ctrl_s
=
translate_key_to_config
(
'ctrl s'
)
meta_d
=
translate_key_to_config
(
'meta d'
)
esc
=
translate_key_to_config
(
'esc'
)
f4
=
translate_key_to_config
(
'f4'
)
self
.
assertEqual
(
ctrl_s
,
'<C-s>'
)
self
.
assertEqual
(
meta_d
,
'<M-d>'
)
self
.
assertEqual
(
esc
,
'<Esc>'
)
self
.
assertEqual
(
f4
,
'<F4>'
)
if
__name__
==
'__main__'
:
unittest
.
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment