def test_string(self):
     with pytest.raises(ValueError):
         inputs.natural('foo')
 def test_negative(self):
     with pytest.raises(ValueError):
         inputs.natural(-1)
 def test_default(self):
     assert inputs.natural(3) == 3
Beispiel #4
0
 def test_default(self):
     assert_equal(3, inputs.natural(3))
Beispiel #5
0
 def test_string(self):
     with assert_raises(ValueError):
         inputs.natural('foo')
Beispiel #6
0
 def test_string(self):
     with assert_raises(ValueError):
         inputs.natural('foo')
Beispiel #7
0
 def test_negative(self):
     with assert_raises(ValueError):
         inputs.natural(-1)
Beispiel #8
0
 def test_default(self):
     assert_equal(3, inputs.natural(3))
Beispiel #9
0
 def test_negative(self):
     with assert_raises(ValueError):
         inputs.natural(-1)
Beispiel #10
0
 def test_string(self):
     with pytest.raises(ValueError):
         inputs.natural('foo')
Beispiel #11
0
 def test_default(self):
     assert inputs.natural(3) == 3
Beispiel #12
0
 def test_negative(self):
     with pytest.raises(ValueError):
         inputs.natural(-1)