コード例 #1
0
 def test_output_value(self):
     assert 2 == mod(10, 4)
     assert mod(2.2, 1) == pytest.approx(0.2)
     assert mod(2, 1.1) == pytest.approx(0.9)
コード例 #2
0
 def test_first_argument_validity(self):
     assert mod(VALUE_ERROR, 1) == VALUE_ERROR
     assert mod('x', 1) == VALUE_ERROR
コード例 #3
0
 def test_second_argument_validity(self):
     assert mod(2, VALUE_ERROR) == VALUE_ERROR
     assert mod(2, 'x') == VALUE_ERROR
     assert mod(2, 0) == DIV0
     assert mod(2, None) == DIV0
コード例 #4
0
ファイル: excellib.py プロジェクト: omalleyt12/pycel-1
 def test_second_argument_validity(self):
     with self.assertRaises(TypeError):
         mod(2, 1.1)
コード例 #5
0
ファイル: excellib.py プロジェクト: omalleyt12/pycel-1
 def test_output_value(self):
     self.assertEqual(mod(10, 4), 2)
コード例 #6
0
ファイル: test_excellib.py プロジェクト: dgorissen/pycel
 def test_output_value(self):
     assert 2 == mod(10, 4)
     assert mod(2.2, 1) == pytest.approx(0.2)
     assert mod(2, 1.1) == pytest.approx(0.9)
コード例 #7
0
ファイル: excellib.py プロジェクト: omalleyt12/pycel-1
 def test_first_argument_validity(self):
     with self.assertRaises(TypeError):
         mod(2.2, 1)
コード例 #8
0
ファイル: test_excellib.py プロジェクト: dgorissen/pycel
 def test_second_argument_validity(self):
     assert mod(2, VALUE_ERROR) == VALUE_ERROR
     assert mod(2, 'x') == VALUE_ERROR
     assert mod(2, 0) == DIV0
     assert mod(2, None) == DIV0
コード例 #9
0
ファイル: test_excellib.py プロジェクト: dgorissen/pycel
 def test_first_argument_validity(self):
     assert mod(VALUE_ERROR, 1) == VALUE_ERROR
     assert mod('x', 1) == VALUE_ERROR
コード例 #10
0
ファイル: excellib.py プロジェクト: SergeBredin/pycel
 def test_output_value(self):
     self.assertEqual(mod(10, 4), 2)
コード例 #11
0
ファイル: excellib.py プロジェクト: SergeBredin/pycel
 def test_second_argument_validity(self):
     with self.assertRaises(TypeError):
         mod(2, 1.1)
コード例 #12
0
ファイル: excellib.py プロジェクト: SergeBredin/pycel
 def test_first_argument_validity(self):
     with self.assertRaises(TypeError):
         mod(2.2, 1)