diff --git a/Recipes Project.py b/Recipes Project.py index c759e01..3b9714e 100644 --- a/Recipes Project.py +++ b/Recipes Project.py @@ -1,2 +1,23 @@ -x = 2+2 -print (x) +#asking for available ingredients""" +ingredients = input("what ingredients do you have available? (please seperate each with a comma)") +print ('okay let me check what recipes we have available with', ingredients, '...') + + +#importing recipes and store in dict varibale +import csv +recipes = csv.DictReader(open('recipes.csv')) +for row in recipes: + print(row) + +def recipes(documentation): +""" Description of the function +Input: +Ingredients that are available to user + +Output: +All recipes that require only those ingredients + +""" + return documentation + + diff --git a/Test/unittest_example.py b/Test/unittest_example.py new file mode 100644 index 0000000..2545e79 --- /dev/null +++ b/Test/unittest_example.py @@ -0,0 +1,12 @@ +import unittest + +class TestSum(unittest.TestCase): +#this one should pass the test + def test_sum(self): + self.assertEqual(sum([2, 2, 3]), 7, "Correct answer is 7") +#this one should not pass the test (testing the test in this case..) + def test_sum_opposite(self): + self.assertEqual(sum((1, 2, 3)), 7, "Correct answer is 7") + +if __name__ == '__main__': + unittest.main()