Пример #1
0
 def test_entropy(self):
     e1 = entropy.random_entropy()
     e2 = entropy.random_entropy()
     assert_((e1 != e2))
     e1 = entropy.random_entropy(10)
     e2 = entropy.random_entropy(10)
     assert_((e1 != e2).all())
     e1 = entropy.random_entropy(10, source='system')
     e2 = entropy.random_entropy(10, source='system')
     assert_((e1 != e2).all())
Пример #2
0
 def test_entropy(self):
     e1 = entropy.random_entropy()
     e2 = entropy.random_entropy()
     assert_((e1 != e2))
     e1 = entropy.random_entropy(10)
     e2 = entropy.random_entropy(10)
     assert_((e1 != e2).all())
     e1 = entropy.random_entropy(10, source='system')
     e2 = entropy.random_entropy(10, source='system')
     assert_((e1 != e2).all())
Пример #3
0
 def test_fallback(self):
     e1 = entropy.random_entropy(source='fallback')
     time.sleep(0.1)
     e2 = entropy.random_entropy(source='fallback')
     assert_((e1 != e2))
Пример #4
0
 def test_fallback(self):
     e1 = entropy.random_entropy(source='fallback')
     time.sleep(0.1)
     e2 = entropy.random_entropy(source='fallback')
     assert_((e1 != e2))