# Path: tests/keyboards.py
# class TestKeyboardLayout(BaseTestCase):
# 
#     def setup(self):
#         self.valid_keys = shmaplib.get_all_valid_keynames()
#         self.keyboard_templates = glob.glob(os.path.join(shmaplib.DIR_CONTENT_KEYBOARDS, '*.html'))
# 
#     def test_validate_keyboard_template_keynames(self):
#         print('\n')
#         for p in self.keyboard_templates:
#             print("   " + p)
#             with open(p, 'r') as template_file:
#                 contents = template_file.read()
#                 key_names = re.findall(r'.*button data-key="(.*?)"', contents)
#                 for keyname in key_names:
#                     self.assert_in(keyname, self.valid_keys)


import unittest
from .keyboards import TestKeyboardLayout



def main():
    """
    Runs the testsuite as command line application, or... that's what it will eventually do.
    For the moment, just run everything
    """

    try:
        suite = unittest.TestSuite()

# Path: tests/keyboards.py
# class TestKeyboardLayout(BaseTestCase):
# 
#     def setup(self):
#         self.valid_keys = shmaplib.get_all_valid_keynames()
#         self.keyboard_templates = glob.glob(os.path.join(shmaplib.DIR_CONTENT_KEYBOARDS, '*.html'))
# 
#     def test_validate_keyboard_template_keynames(self):
#         print('\n')
#         for p in self.keyboard_templates:
#             print("   " + p)
#             with open(p, 'r') as template_file:
#                 contents = template_file.read()
#                 key_names = re.findall(r'.*button data-key="(.*?)"', contents)
#                 for keyname in key_names:
#                     self.assert_in(keyname, self.valid_keys)


# Path: tests/run_all_tests.py
import unittest
from .keyboards import TestKeyboardLayout




def main():
    """
    Runs the testsuite as command line application, or... that's what it will eventually do.
    For the moment, just run everything
    """

    try:
        suite = unittest.TestSuite()

        suite.addTest(unittest.makeSuite(TestKeyboardLayout))