示例#1
0
 def test2(self):
     assert sets.average([1, 2, 1, 2, 3]) == 2.0
示例#2
0
def test_sets():
    with mock.patch('builtins.input', side_effect=['10', '161 182 161 154 176 170 167 171 170 174'] ):
        assert sets.average() == 169.375
示例#3
0
 def test3(self):
     assert sets.average([1, 2, 2, 5, 6, 3]) == 3.4
示例#4
0
def test_sets():
    with mock.patch('builtins.input', side_effect=['100', '158 163 170 169 165 159 173 165 165 170 156 166 153 170 154 164 157 162 168 154 168 161 182 156 182 178 175 184 177 162 165 179 171 170 167 158 164 182 154 152 154 157 183 164 152 164 156 165 178 161 178 175 176 168 180 166 171 175 169 178 157 166 178 175 173 160 170 159 177 155 177 154 163 181 166 162 168 164 172 164 157 168 158 178 156 168 159 160 168 156 182 154 159 165 173 173 176 162 167 158'] ):
        assert sets.average() == 167.8125