Пример #1
0
 def test_negative(self):
     with pytest.raises(ValueError):
         inputs.positive(-1)
Пример #2
0
 def test_positive(self):
     assert inputs.positive(1) == 1
     assert inputs.positive(10000) == 10000
Пример #3
0
 def test_zero(self):
     with pytest.raises(ValueError):
         inputs.positive(0)
Пример #4
0
 def test_zero(self):
     with assert_raises(ValueError):
         inputs.positive(0)
Пример #5
0
 def test_negative(self):
     with assert_raises(ValueError):
         inputs.positive(-1)
Пример #6
0
 def test_negative(self):
     with assert_raises(ValueError):
         inputs.positive(-1)
Пример #7
0
 def test_positive(self):
     assert_equal(1, inputs.positive(1))
     assert_equal(10000, inputs.positive(10000))
Пример #8
0
 def test_zero(self):
     with assert_raises(ValueError):
         inputs.positive(0)
Пример #9
0
 def test_positive(self):
     assert_equal(1, inputs.positive(1))
     assert_equal(10000, inputs.positive(10000))
Пример #10
0
 def test_negative(self):
     with pytest.raises(ValueError):
         inputs.positive(-1)
Пример #11
0
 def test_zero(self):
     with pytest.raises(ValueError):
         inputs.positive(0)
Пример #12
0
 def test_positive(self):
     assert inputs.positive(1) == 1
     assert inputs.positive(10000) == 10000