Esempio n. 1
0
class TestTaskClass(unittest.TestCase):
    """
        Test cases for the Task class
    """
    def setUp(self):
        self.a_task = Task()
        self.a_task.Skill_Pool.clear()
        self.a_task.add_skill("python")
        self.python_skill = Skill('python')

    def test_add_skill(self):
        self.assertEqual('python',
                         self.a_task.Skill_Pool[0].name,
                         msg="There should be a skill named 'python' in tasks")

    def test_studied_invalid_input(self):
        self.assertEqual(
            'Add skill first',
            self.a_task.studied('Javascript'),
            msg="Should first add a skill before marking it as studied")
#user name
user_name = input("Enter Your Name: ")
print("_______________________________________________ ")
print("Welcome " + user_name)

while True:

    print(" ")
    print(" [a]- Add skill")
    print(" ")
    print(" [b]- View Added Skill")
    print(" ")
    print(" [c]- View Skills Studied")
    print(" ")
    print(" [d]- Show Learnin Progress")
    print("__________________________________________________")

    option_input = input("Enter Option: ")  #options
    print(" ")
    if option_input == 'a':
        ans = input("What would you like to learn? :")
        tasks.add_skill(ans)
    elif option_input == 'b':
        print(tasks.view_skills())
    elif option_input == 'c':
        print("view studied skill")
    elif option_input == 'd':
        print(tasks.progress_bar())
    else:
        print("Sorry Option Unvailable: :please input in letters e.g a")