def test_random_sample_different_definitions():
 a = db.from_sequence(range(50), npartitions=5)
 assert (list(a.random_sample(0.5)) != list(a.random_sample(0.5)))
 assert (a.random_sample(0.5).name != a.random_sample(0.5).name)

def test_random_sample_different_definitions ( ) : a = db . from_sequence ( range ( 50 ) , npartitions = 5 ) assert ( list ( a . random_sample ( 0.5 ) ) != list ( a . random_sample ( 0.5 ) ) ) assert ( a . random_sample ( 0.5 ) . name != a . random_sample ( 0.5 ) . name )
repeatedly defining a random sampling operation yields different results upon computation if no random seed is specified .