import unittest

from basic_programming.complexity_analysis import sum_ab, vowel_recognition


class TestComplexityAnalysis(unittest.TestCase):
    def test_ab(self):
        """
        Tests that it can sum two given numbers
        """
        answer_list = [3, 7, 24]
        input_list = [[1, 2], [2, 5], [10, 14]]
        for i in range(len(answer_list)):
            print('i: {}'.format(i))
            self.assertEqual(answer_list[i],
                             sum_ab(input_list[i][0], input_list[i][1]))

    def test_vowel_recognition(self):
        """
        Tests that it can return the correct
        amount of vowels from a string
        """
        self.assertEqual(16, vowel_recognition('baceb'))
        self.assertEqual(7811003, vowel_recognition('DXqzxJrCnsAUSmkUkQCedQTcyYHIUPixMbyLKQoAKOuDDgxNWBRCrmErkNafCKeQnfBYxPahgumJclYAMPcFbizNVbuxnbnBgrbDIbmqXbZZOzzdQeItmJhiKdFYevbMMcRWdGnajOZXoaaeGlyTUhbhkifRfgftKzqNfDNQToNhQqmxBmqXtTefDLWJtEEddUsiZfYTVnCMDqjGCbgxUMDZazkVdPZglTQlZqGUEKiJbrSfUYDOKgqKhAGNphTBCmoBCwYIggUJaMPUmUlyadLhDTwTCqWeeMiiigtQOncqBtNNnANPDyygrVBTNxYRjIBTOUmehoXkHmXwMLlpLlXdgbyvyYmkGOdWIpDsfACMMcKapxRaJOFrPeNQcZClphhAZKueMWtaAdaPBtQMKvdbbQtGsVRjdAJcNFgzezcEfEWiYoUIlXlnqFTIAKtDMFhzkoZopDvWhreHFARQadFqIyAiKToxyXWllxzdCUBKNGrUIjLImqAwragDwWawUzHHyhKbDOnTuENEpandTpzkSipoeqKYrUGrbSsgGFBCMphDRWHKlIwdQMTVEgvxaDODwJlEQNhCEQIvMpgzzefqQANWGKtGoiL'))
        self.assertEqual(0, vowel_recognition('R'))
        self.assertEqual(16343324, vowel_recognition('QHKXMQpWlblTdmAKeqkRnReiZsqLEJIuTUUFKjBxNoTQAtchJmAydEHFWzqcjAxcuTjGcmFPcyheRjldYMdbqKiPMytxYQzUlkcowIFagpeAyqDwEGaUTilhjFEJXdEjPiZNQENzTRBUheSnmSKHDVOMcsvaXBLMmKzcQmdKGEgpkYDZtnGWivkNNhpLJaxVmzzcnfoTlujYtMXMZDkJYuwMBLZMnYjzxleLqsEdNpbIbYWCCgmcckqfypSLQblnmpAejHiyWLgAKEcOmQsobJuzAOMqrXgEOikYrUwoGfqSlsGyLAoojINmwbeOZMUpVGPmBOcJTsBGnJeYjtmVDBJCCNqdcMtzUKnXyqGTkhAxsEXCzLZdOIFrXxWZLRyFCMDaEjUqTuOlAnpaBodpykGYHfXsWYzymcbsOxIjRYuTOmTpcyEdINbRSALqylPmnsgDPPMipJbdxxszxXCgmDzeeluewLTldZruqdCGoEJLbclyBpgNvitbtpfrbAeGcvbsbDYpJkDKOqLRFtgaBzDwOJNrLuANPdgsGGkqsNCIdPzkjFNKGqhvBwonQqCitkcCtmuLZWuEovrxbeJHWsEyrvnJLPRfawHtIbGkzCqpYHMZnYikqpIHKVTvmKcmIlhrOOBQStfQburosAykPIuzfnwszbgimozDECtwxaPyugpoGpzXYTYdIXvhYCpMsqRyukwSNlShshwAxxyXSYaAVYHvczKurBuooQIbcAKukIwjfwgXvIxSGHoIIYEBzYPpPxqtAbpKJLvriBofLoXUxNCfLJGNjYcAvt'))
        self.assertEqual(2399122, vowel_recognition('xWihhUeyEhplTfiNCWRjjcrWmpBMnUGKsqubMycqGTBbYmOcKhNTkGQYyrKLNSXHjTIVUmOcfpdFdtHNcWHmDZMbSxohpNqajAWdNKHSBKyhFHUHgdwlEiOYhcfxrvZcyVflhMFJYdQfnmNVqLgwTUvDyACPyBuWxzJEOoPoUFuJuhEKuKIPEdscgUtEwNcvPnZfBrtvyNeSwkeQUNGyQAcWvYctLGOcTphvGBsfoZznjEdGrlGhMJGhHIcUpQXifefohaVYBulKYQqRcXZOiFxrPzleRKPyrwMywjYXEjkeacWcBxsJEratQOyjyPHrlWsIfqFlArqcuOGVNAhrRhKjxKsyzZPLVhtDaAOcuGeOWmJJMQaDALoXvGXVhNiFwdiwDWyXfenbqzLcpLhrYvRubORLdZqAcyyhWX'))
        self.assertEqual(8568, vowel_recognition('bbUFUtqWlDeeCbVWdmpqRoGrSesZCpigSFLoAblLERsgSPExbTNTJtMBZedeVl'))
        self.assertEqual(195293, vowel_recognition('qQVETWrgciyLDopaRLOmuJBylhBpFozVHubASVGUdfFGVxjoizBCiEatLdkqsJNBFrbxmHUpobyLyHaiIdnQHPMUTWlNiAoNRRNdajVRktClCeVkhiCqAQltpYIxyyMqRbtRkokXjpKntFxdqCtQsgLHeVGftVvMWqfJhqGSFqgYxfDNHzDCFQL'))
        self.assertEqual(27863587, vowel_recognition('LsrGPosLgyunOCgtumTSTZhdynFFdqtrkmXZAqnjOHwCMexgqSAMtkPRxuZcmstxFrYHHlQXvPbhTaPMSSyOcnFbjgdvzZuGStPbgiYBXZksZCetuehYTpZcXEaYDugXpWYwGWzDxKxYmCsiibgcSfeQJeqPbxoStnoZLqejCdhOhbWqFEsZJwrUdIlefAyapNBaFhLhkTVswtIDXaDiYUEbCQHHSgHhviJaRvJcQEumzcQYEVICPmgUcpdwXnDsXPUPkDRaJlOKPgkVbSZtffPJXSgUflPdalSkPlMaYdnpLxkpqjIvRxGORMIXYZCAlWnChZCfEPWqngFfRPcIOIwFvHeVGGvteIVlkySOPOGEwlJoCnWqWVyTeCOmLLGPWdDgdXwToFZKQlAVyZluwJnAODozpUQNAtvDTRwhYYtPjwKHvxERJtTxXhyOEoBekyHFRGMQEHFpdRWaQcRzwKyVSWJwNMczkJebpsRvBYKhrjhilZjHlICFgNDvzFUlRAPgSGCWhOdyXkGjLsszaVegkkCmPYxGzmpTvtPChuCfhjQSBiTdFALQKPEbODkPQzkNuaRdWtKdeAyFlrkQRWiBLMfbqpQIqbXKDONbhafmADtLwgeocmrpBwTtnJDDmAPrQftXfaLhDHTBNzPrnJiqHbJVnmazostexoEeopltyGUNfmeVVnleoVBdJCfYUyETMiXCaKVarPOYbSTyHfDyaeBliGLcGqxUaWwCHrDYhrWKLQjVxotxswkBFWflODgOzCTgwwGfpfPaxAxUOQTJPdkuBpFpunGwsbeOxLvosMQPnoJDGCmvhYPJQXAkkIiCJnSIAnWSaNHPDSUjWhFdHWoxTrIGBQKlFDvfssXUHglkYgtUPAAwxqUSjeyLwjycoTJiNHFupQgoycKnCMmBdIumouXKDvotRACEJhBYzHOYlzNqlZRQjNdxiCKLAAfrajxJqYkri'))
        self.assertEqual(1009239, vowel_recognition('ptxdJlEdbOQeNYjxKJYrCAcZkUYulIUBbsgnDmqgCgNqfWprhnkJqmkcgKYrsSuWkAjpNzYRhLhmjxfqmpBCBLgjweBqXVmJYvZnwzegkOstlaJZpMetxkCvpFMmdYxDWwQsxwyHMtazVlzMXffXpksgreUWdszBqRTOQUvCPYcKLdwJieiZQAgJhaGMsfnJzgZpCuRrUvDGyCpGiZGYzojGoPsjxFuWotlspcmkyPQyTHHbGPBHdLQTAiEzqAvgTGyLlKxlcPJVYqzgfaNKnDEqoKPEllKGRKrEvqPZfbUdTVLZWzlLErbScRYnckTvVNaSFrRLsnqmjcNHdYsHSWcUNCJrNeMktoc'))
        self.assertEqual(13372414, vowel_recognition('GvKAkCMVgzCjaxtuVXoIzzZODnYXCaWKXikimXdtYieAhxUcWKKYjlMNyLmCnKmlSxteuYZUgevPdRRaCdYLomapXORlyeYSBTzxRyTACQRGIJikMIxDUySumlhnRffUAErTFNVhDNplwZvKjTPeTjaHvhUmOCJogChLpdvTQmeOmcyvxQbSZbzWKujyySMEWUSmzPfRbLFPpFNovOgvsGrcCcBawPgtlAhKpmBTzIIPoXFloMGGsAkwenYddeYQhfdwTERUPAldxRQLDxTxzGTfvRKaxIREpUDiaudPwouwflJIkfHlLAqgTbJTlAZBueJuzoMxDgvkrfvdMcoZfhHYiqtVQtwMxIhyWvWbBTOvAjamNplSwTtgjMbCfyofgXDEsbiwVWtXfVkukXniQGoCUSGaqUHYukeMOmKliFiPBsknqZwIhmMbesbWPkwjvBxLpiWapersZBGRccbjQOlVgOtVZQGWTeHKOfKdLcwKfEdKifTYTGvBvPZWhFSCJbmxgzdRdbeiFhSNmoLHUJLpyKNhRFJdGxcMWfgZIkKnreCgsopnXaeXmSeGZpJGMLUJtakbkUReZtkrjzgIcNhQFlwEAfMPtHyojkRWfIaGEMzNNiYPVfGcTEiVmVKFeKTPVKLCVLizxjONrMCmuKonRZidUTkAfFRaRDeMQmNQwCDpQHCkUsxLriqNDAPIfHlWkplCeYscAVrTfTdZOdKHlaXOcoYhVjFHzQkD'))
        self.assertEqual(628750, vowel_recognition('eFRayKfUOGIRSRESOswdSDAcKKdBUiqApJANuhHKNRdFJHZZBvEtAfXlPaolKELZPONjxuTNOysxfUwiRbCUIbHZEVkobxoQNDClzXYnwSKdoJmgmqCUrjTVGFkHEaZsDBfczdqVxCYMlMuxcWTWHoRPTDwafXsIzZnAcfXbHxNTkJSmFMiOCCDwHBYNzSvARkavpzwXWksgTMVbyFrbhVZPYzeZrzzimbDBAZaxLsfhfaifGbIpyjGxIKwZMyhYzKbamcZXueebfOhnQrCoBj'))

