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