From 44a214c890207188071426c5efc5275d7fab3b66 Mon Sep 17 00:00:00 2001 From: Venkata Chintaluri Date: Wed, 27 Jun 2018 17:40:27 -0400 Subject: [PATCH] Step 2 completed --- .pytest_cache/v/cache/lastfailed | 1 + .pytest_cache/v/cache/nodeids | 56 ++++++++++++++++++++++++++++++++ .pytest_cache/v/flakes/mtimes | 50 ++++++++++++++++++++++++++++ .pytest_cache/v/mccabe/mtimes | 50 ++++++++++++++++++++++++++++ .pytest_cache/v/pep8/mtimes | 50 ++++++++++++++++++++++++++++ tests/test_catmath.py | 14 ++++++-- 6 files changed, 218 insertions(+), 3 deletions(-) create mode 100644 .pytest_cache/v/cache/lastfailed create mode 100644 .pytest_cache/v/cache/nodeids create mode 100644 .pytest_cache/v/flakes/mtimes create mode 100644 .pytest_cache/v/mccabe/mtimes create mode 100644 .pytest_cache/v/pep8/mtimes diff --git a/.pytest_cache/v/cache/lastfailed b/.pytest_cache/v/cache/lastfailed new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/.pytest_cache/v/cache/lastfailed @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.pytest_cache/v/cache/nodeids b/.pytest_cache/v/cache/nodeids new file mode 100644 index 0000000..3520e8e --- /dev/null +++ b/.pytest_cache/v/cache/nodeids @@ -0,0 +1,56 @@ +[ + "tests/test_catactivities.py", + "tests/test_catactivities.py", + "tests/test_catactivities.py", + "tests/test_catactivities.py::test__cat_nap__satisfying_nap", + "tests/test_catactivities.py::test__cat_nap__not_satisfying", + "tests/test_catgenerator.py", + "tests/test_catgenerator.py", + "tests/test_catgenerator.py", + "tests/test_catgenerator.py::test__", + "tests/test_catmath.py", + "tests/test_catmath.py", + "tests/test_catmath.py", + "tests/test_catmath.py::test__cat_years_to_hooman_years__middle_age__succeeds", + "tests/test_catmath.py::test__cat_years_to_hooman_years__less_than_one_year__succeeds", + "tests/test_catmath.py::test__cat_years_to_hooman_years__0__returns_0", + "tests/test_catmath.py::test__is_cat_leap_year__succeeds", + "tests/test_cattery.py", + "tests/test_cattery.py", + "tests/test_cattery.py", + "tests/test_cattery.py::test__add_cats__succeeds", + "tests/test_cattery.py::test__remove_cat__succeeds", + "tests/test_cattery.py::test__remove_cat__no_cats__fails", + "tests/test_cattery.py::test__remove_cat__cat_not_in_cattery__fails", + "tests/test_safecatmath.py", + "tests/test_safecatmath.py", + "tests/test_safecatmath.py", + "tests/test_safecatmath.py::test__cat_years_to_hooman_years__middle_age__succeeds", + "tests/test_safecatmath.py::test__cat_years_to_hooman_years__less_than_one_year__succeeds", + "tests/test_safecatmath.py::test__cat_years_to_hooman_years__0__returns_0", + "tests/test_safecatmath.py::test__cat_years_to_hooman_years__less_0__raises", + "tests/test_safecatmath.py::test__cat_years_to_hooman_years__older_than_1000__raises", + "tests/test_safecatmath.py::test__cat_years_to_hooman_years__string__raises", + "tests/test_safecatmath.py::test__cat_years_to_hooman_years__nan__raises", + "catinabox/__init__.py", + "catinabox/__init__.py", + "catinabox/__init__.py", + "catinabox/catactivities.py", + "catinabox/catactivities.py", + "catinabox/catactivities.py", + "catinabox/catgenerator.py", + "catinabox/catgenerator.py", + "catinabox/catgenerator.py", + "catinabox/catmath.py", + "catinabox/catmath.py", + "catinabox/catmath.py", + "catinabox/cattery.py", + "catinabox/cattery.py", + "catinabox/cattery.py", + "catinabox/mccattery.py", + "catinabox/mccattery.py", + "catinabox/mccattery.py", + "catinabox/safecatmath.py", + "catinabox/safecatmath.py", + "catinabox/safecatmath.py" +] \ No newline at end of file diff --git a/.pytest_cache/v/flakes/mtimes b/.pytest_cache/v/flakes/mtimes new file mode 100644 index 0000000..036bf0b --- /dev/null +++ b/.pytest_cache/v/flakes/mtimes @@ -0,0 +1,50 @@ +{ + "catinabox/__init__.py": [ + 1530132471.30254, + [] + ], + "catinabox/catactivities.py": [ + 1530132471.3026836, + [] + ], + "catinabox/catgenerator.py": [ + 1530132471.3028803, + [] + ], + "catinabox/catmath.py": [ + 1530132471.303155, + [] + ], + "catinabox/cattery.py": [ + 1530132471.3034825, + [] + ], + "catinabox/mccattery.py": [ + 1530132471.3036933, + [] + ], + "catinabox/safecatmath.py": [ + 1530132471.3039005, + [] + ], + "tests/test_catactivities.py": [ + 1530132471.3176026, + [] + ], + "tests/test_catgenerator.py": [ + 1530132471.3179, + [] + ], + "tests/test_catmath.py": [ + 1530135288.7559228, + [] + ], + "tests/test_cattery.py": [ + 1530132471.3185308, + [] + ], + "tests/test_safecatmath.py": [ + 1530132471.3189354, + [] + ] +} \ No newline at end of file diff --git a/.pytest_cache/v/mccabe/mtimes b/.pytest_cache/v/mccabe/mtimes new file mode 100644 index 0000000..5cc4114 --- /dev/null +++ b/.pytest_cache/v/mccabe/mtimes @@ -0,0 +1,50 @@ +{ + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/__init__.py": [ + 1530132471.30254, + 7 + ], + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/catactivities.py": [ + 1530132471.3026836, + 7 + ], + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/catgenerator.py": [ + 1530132471.3028803, + 7 + ], + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/catmath.py": [ + 1530132471.303155, + 7 + ], + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/cattery.py": [ + 1530132471.3034825, + 7 + ], + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/mccattery.py": [ + 1530132471.3036933, + 7 + ], + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/safecatmath.py": [ + 1530132471.3039005, + 7 + ], + "/Users/cvpushkar/src/unittesting/catinabox/tests/test_catactivities.py": [ + 1530132471.3176026, + 7 + ], + "/Users/cvpushkar/src/unittesting/catinabox/tests/test_catgenerator.py": [ + 1530132471.3179, + 7 + ], + "/Users/cvpushkar/src/unittesting/catinabox/tests/test_catmath.py": [ + 1530135288.7559228, + 7 + ], + "/Users/cvpushkar/src/unittesting/catinabox/tests/test_cattery.py": [ + 1530132471.3185308, + 7 + ], + "/Users/cvpushkar/src/unittesting/catinabox/tests/test_safecatmath.py": [ + 1530132471.3189354, + 7 + ] +} \ No newline at end of file diff --git a/.pytest_cache/v/pep8/mtimes b/.pytest_cache/v/pep8/mtimes new file mode 100644 index 0000000..b8de349 --- /dev/null +++ b/.pytest_cache/v/pep8/mtimes @@ -0,0 +1,50 @@ +{ + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/__init__.py": [ + 1530132471.30254, + [] + ], + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/catactivities.py": [ + 1530132471.3026836, + [] + ], + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/catgenerator.py": [ + 1530132471.3028803, + [] + ], + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/catmath.py": [ + 1530132471.303155, + [] + ], + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/cattery.py": [ + 1530132471.3034825, + [] + ], + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/mccattery.py": [ + 1530132471.3036933, + [] + ], + "/Users/cvpushkar/src/unittesting/catinabox/catinabox/safecatmath.py": [ + 1530132471.3039005, + [] + ], + "/Users/cvpushkar/src/unittesting/catinabox/tests/test_catactivities.py": [ + 1530132471.3176026, + [] + ], + "/Users/cvpushkar/src/unittesting/catinabox/tests/test_catgenerator.py": [ + 1530132471.3179, + [] + ], + "/Users/cvpushkar/src/unittesting/catinabox/tests/test_catmath.py": [ + 1530135288.7559228, + [] + ], + "/Users/cvpushkar/src/unittesting/catinabox/tests/test_cattery.py": [ + 1530132471.3185308, + [] + ], + "/Users/cvpushkar/src/unittesting/catinabox/tests/test_safecatmath.py": [ + 1530132471.3189354, + [] + ] +} \ No newline at end of file diff --git a/tests/test_catmath.py b/tests/test_catmath.py index ced6358..ba6c027 100644 --- a/tests/test_catmath.py +++ b/tests/test_catmath.py @@ -2,15 +2,23 @@ def test__cat_years_to_hooman_years__middle_age__succeeds(): - assert True + """ Tests if a middle aged hooman equates to a middle aged cat """ + + hooman_age = catmath.cat_years_to_hooman_years(6) + assert hooman_age == 30 def test__cat_years_to_hooman_years__less_than_one_year__succeeds(): - assert True + """ Checks function using floating point cat and hooman years""" + + hooman_age = catmath.cat_years_to_hooman_years(0.1) + assert hooman_age == 0.5 def test__cat_years_to_hooman_years__0__returns_0(): - assert True + """ Takes 0 as input, returns 0 as output""" + hooman_age = catmath.cat_years_to_hooman_years(0) + assert hooman_age == 0 # BONUS MATERIAL FOR STEP 2