import unittest

import nlpaug.augmenter.char as nac


class TestKeyboard(unittest.TestCase):
    def test_qwerty_single_word(self):
        texts = ['Zoology', 'roku123456']
        aug = nac.KeyboardAug()
        for text in texts:
            augmented_text = aug.augment(text)
            self.assertNotEqual(text, augmented_text)

        self.assertTrue(len(texts) > 0)

    def test_qwerty_multi_words(self):
        texts = ['The quick brown fox jumps over the lazy dog']
        aug = nac.KeyboardAug()
        for text in texts:
            augmented_text = aug.augment(text)
            self.assertNotEqual(text, augmented_text)

        self.assertTrue(len(texts) > 0)

@@ -8,16 +8,26 @@
 unittest
+%0Aimport re
 %0A%0Aimport
@@ -110,23 +110,16 @@
 ef test_
-qwerty_
 single_w
@@ -390,15 +390,8 @@
 est_
-qwerty_
 mult
@@ -622,32 +622,32 @@
 ugmented_text)%0A%0A
-
         self.ass
@@ -650,28 +650,308 @@
 .assertTrue(len(texts) %3E 0)%0A
+%0A    def test_no_special_character(self):%0A        text = 'qwertyuioplmnbvcxza'%0A        for i in range(10):%0A            aug = nac.KeyboardAug(special_char=False)%0A            augmented_text = aug.augment(text)%0A            self.assertTrue(re.match(%22%5E%5Ba-zA-Z0-9%5D*$%22, augmented_text))%0A

rename keyboard test case