コード例 #1
0
ファイル: test_functions.py プロジェクト: jlpeppers1/Example2
 def test_something(self):
     input_age_in_years = 10
     expected_age_in_months = 120
     self.assertEqual(
         expected_age_in_months,
         camper_age_input.convert_to_months(input_age_in_years))
     print('we passed age unit test first time')
     input_age_in_years = 3
     expected_age_in_months = 36
     self.assertNotEqual(
         expected_age_in_months,
         camper_age_input.convert_to_months(input_age_in_years))
     print('we passed age unit test')
コード例 #2
0
 def test_something(self):
     self.assertEqual(camper_age_input.convert_to_months(10), 120)
コード例 #3
0
 def test_something(self):
     self.assertEqual(72, camper_age_input.convert_to_months(6))
コード例 #4
0
 def test_4_years_to_months(self):
     #4 years old should be 48 months
     self.assertEqual(48, cai.convert_to_months(4))
コード例 #5
0
 def test_monthFunction(self):
     x = 4
     result = camper_age_input.convert_to_months(x)
     self.assertEquals(result, 48)
コード例 #6
0
 def test_convert(self):
     self.assertEqual(camper_age_input.convert_to_months(3), 36)
コード例 #7
0
 def test_convert_to_months(self):
     print(camper_age_input.convert_to_months(72))
     self.assertEqual(6,camper_age_input.convert_to_months(72))
コード例 #8
0
 def test_convert_to_months(self):
     self.assertEqual(convert_to_months(12),144)
コード例 #9
0
 def test_convert_to_months(self):
     # Testing if 3 years converted to months is 36
     self.assertEqual(camper_age_input.convert_to_months(3), 36)
コード例 #10
0
 def test_convert_to_months(self):
     self.assertEqual(60, camper_age_input.convert_to_months(5))
コード例 #11
0
 def test_convert_to_months_high(self):
     self.assertEquals(camper_age_input.convert_to_months(72), 864)
コード例 #12
0
 def test_convert_to_months_low(self):
     self.assertEquals(camper_age_input.convert_to_months(4), 48)
コード例 #13
0
 def test_convert_to_months(self):
     self.assertEquals(camper_age_input.convert_to_months(28), 336.0)
コード例 #14
0
 def test_multi(self):  # Function definition.
     # This tests the function convert_to_months in camper_age_input.py.
     self.assertEquals(camper_age_input.convert_to_months(5, 6),
                       30)  # Function definition.
コード例 #15
0
ファイル: test_functions.py プロジェクト: Nyyen8/PythonClass
 def test_convert_to_months_fail(self):
     self.assertNotEqual(36, camper_age_input.convert_to_months(1))
     '''This test checks to see if the functions doesn't return 36, and passes if that is true'''
コード例 #16
0
ファイル: test_functions.py プロジェクト: puckdisc/Python
 def test_convert(self):
     self.assertEqual(240, camper_age_input.convert_to_months(20))
コード例 #17
0
 def test_camper_age_input(self):
     self.assertEqual(36, camper_age_input.convert_to_months(3))
コード例 #18
0
ファイル: test_function.py プロジェクト: cwruck13/Module_2
 def test_5_years_to_months(self):
     #5 years old should be 60 months old
     self.assertEqual(60, cai.convert_to_months(5))
コード例 #19
0
 def test_something(self):
     self.assertEqual(120, camper_age_input.convert_to_months(10))
     self.assertEqual(0, camper_age_input.convert_to_months(0))
     self.assertEqual(1200, camper_age_input.convert_to_months(100))
コード例 #20
0
ファイル: test_function.py プロジェクト: cwruck13/Module_2
 def test_16_years_to_months(self):
     #16 years old should be 192 months old
     self.assertEqual(192, cai.convert_to_months(16))
コード例 #21
0
 def test_correct_age(self):
     self.assertEqual(camper_age_input.convert_to_months('3'), 36)
コード例 #22
0
ファイル: test_function.py プロジェクト: cwruck13/Module_2
 def test_12_years_to_months(self):
     #12 years old should be 144 months old
     self.assertEqual(144, cai.convert_to_months(12))
コード例 #23
0
 def test_age(self):
     self.assertEquals(camper_age_input.convert_to_months(2), 24)
     self.assertEquals(camper_age_input.convert_to_months(5), 60)
     self.assertFalse(camper_age_input.convert_to_months(-2), 24)
     self.assertRaises(camper_age_input.convert_to_months("string"))
コード例 #24
0
 def test_int2(self):
     self.assertEqual(24, camper_age_input.convert_to_months(2))
コード例 #25
0
 def test_something(self):
     self.assertEqual(36, convert_to_months(3))
コード例 #26
0
ファイル: test_functions.py プロジェクト: Kellysmith7/TDD
 def test_convert_age_months(self):
     self.assertEqual(camper_age_input.convert_to_months(-1), 12)
コード例 #27
0
 def test_something(self):
     self.assertEqual(60, camper_age_input.convert_to_months(5))
     self.assertEqual(36, camper_age_input.convert_to_months(3))
     self.assertEqual(24, camper_age_input.convert_to_months(2))
     self.assertEqual(12, camper_age_input.convert_to_months(1))
コード例 #28
0
ファイル: test_functions.py プロジェクト: Nyyen8/PythonClass
 def test_convert_to_months_pass(self):
     self.assertEqual(36, camper_age_input.convert_to_months(3))
     '''This test checks to see if the functions returns a result of 36, and passes if that is true'''
コード例 #29
0
 def test_increase(self):
     self.assertEqual(2, camper_age_input.convert_to_months(24))
コード例 #30
0
 def test_years_to_months(self):
     months = convert_to_months(3, 12)
     self.assertEqual(months, 36)