Exemplo n.º 1
0
 def test_bad_input(self):
     with mock.patch('builtins.input', side_effect=[90, 'dog', 85]):
         with self.assertRaises(ValueError):
             basic_list.make_list()
Exemplo n.º 2
0
 def test_make_list(self, input):
     self.assertEqual(make_list(), ['5.0', '5.0', '5.0'])
Exemplo n.º 3
0
 def test_make_list(self, input):
     self.assertEqual(topic1.make_list(), [5, 5, 5])
Exemplo n.º 4
0
 def test_get_input(self):
     # mock input from a user
     with mock.patch('builtins.input', side_effect=[85, 90, 95]):
         assert basic_list.make_list() == [85, 90, 95]
 def test_make_list(self, input):
     self.assertEqual(basic_list.make_list(input), [8, 6, 9])
Exemplo n.º 6
0
 def test_make_list(self, input):
     self.assertEqual(basic_list.make_list(), ['5','5','5','5','5','5'])
Exemplo n.º 7
0
 def test_make_list(self):
     self.assertEqual(basic_list.make_list(), [5, 5, 5])
Exemplo n.º 8
0
def get_list():
    list = basic_list.make_list()
    return list
Exemplo n.º 9
0
 def test_make_list(self, users_input):
     self.assertEqual(test_basic_list.make_list(), [666, 666, 666])
 def test_something(self, input):
     self.assertEqual(basic_list.make_list(), [5, 5, 5])
Exemplo n.º 11
0
 def test_make_list_non_numeric(self, input):
     with self.assertRaises(ValueError):
         basic_list.make_list()
Exemplo n.º 12
0
def test_make_list_above_range(self, input):  # pass input
    with self.assertRaises(ValueError):  # this is familiar
        topic1.make_list()
Exemplo n.º 13
0
def test_make_list_non_numeric(self, input):  # pass input
    with self.assertRaises(ValueError):  # this is familiar
        topic1.make_list()  # call the function!
Exemplo n.º 14
0
 def test_make_list(self, input):
     self.assertEqual(topic1.make_list(), ['7', '7', '7'])
Exemplo n.º 15
0
 def test_make_list(self, input):
     self.assertEqual(list.make_list(), [7, 7, 7])
Exemplo n.º 16
0
 def test_make_list(self, input):
     self.assertEqual(basic_list.make_list(), [55, 55, 55])
Exemplo n.º 17
0
 def test_make_list_below_range(self, input):
     with self.assertRaises(ValueError):
         basic_list.make_list()