예제 #1
0
 def test_p_max_range(self):
     for m_max in range(1, 55+1):
         p_max = _compute_p_max(m_max)
         assert_(p_max*(p_max - 1) <= m_max + 1)
         p_too_big = p_max + 1
         assert_(p_too_big*(p_too_big - 1) > m_max + 1)
 def test_p_max_range(self):
     for m_max in range(1, 55 + 1):
         p_max = _compute_p_max(m_max)
         assert_(p_max * (p_max - 1) <= m_max + 1)
         p_too_big = p_max + 1
         assert_(p_too_big * (p_too_big - 1) > m_max + 1)
예제 #3
0
 def test_p_max_default(self):
     m_max = 55
     expected_p_max = 8
     observed_p_max = _compute_p_max(m_max)
     assert_equal(observed_p_max, expected_p_max)
 def test_p_max_default(self):
     m_max = 55
     expected_p_max = 8
     observed_p_max = _compute_p_max(m_max)
     assert_equal(observed_p_max, expected_p_max)