debug print cleanup

This commit is contained in:
sezanzeb 2020-11-08 01:03:13 +01:00 committed by sezanzeb
parent d93e7f271b
commit 2b1a0de45f
3 changed files with 1 additions and 5 deletions

View File

@ -94,7 +94,6 @@ class Mapping:
new_keycode : int
character : string
"""
print('change', previous_keycode, new_keycode, character)
if new_keycode and character and new_keycode != previous_keycode:
self._mapping[new_keycode] = character
if new_keycode != previous_keycode:
@ -111,7 +110,6 @@ class Mapping:
----------
keycode : int
"""
print('clear', id(self), keycode, self._mapping.get(keycode))
if self._mapping.get(keycode) is not None:
del self._mapping[keycode]
@ -191,7 +189,6 @@ def create_setxkbmap_config(device, preset, mapping):
mapping : Mapping
"""
if len(mapping) == 0:
print(mapping._mapping)
logger.debug('Got empty mappings')
return None

View File

@ -23,6 +23,7 @@ import unittest
class TestX(unittest.TestCase):
# TODO test the mapping object
pass

View File

@ -43,7 +43,6 @@ class TestCreatePreset(unittest.TestCase):
def test_create_preset_2(self):
create_preset('device 1')
create_preset('device 1')
print(f'{tmp}/symbols/device_1/new_preset')
self.assertTrue(os.path.exists(f'{tmp}/symbols/device_1/new_preset'))
self.assertTrue(os.path.exists(f'{tmp}/.config/device_1/new_preset'))
self.assertTrue(os.path.exists(f'{tmp}/symbols/device_1/new_preset_2'))
@ -74,7 +73,6 @@ class TestFindPresets(unittest.TestCase):
shutil.rmtree(tmp)
def test_find_newest_preset_1(self):
print('test_find_newest_preset_1')
create_preset('device 1', 'preset 1')
time.sleep(0.01)
create_preset('device 2', 'preset 2')