def test_gets_parent_attributes(): """ Test that a random sample is an instance of the sampled thing. """ qur = UniqueSubscribers(start="2016-01-01", stop="2016-01-04", hours=(4, 17)) sample = qur.random_sample( size=10, sampling_method="bernoulli", estimate_count=False ) assert sample.hours == (4, 17)
def test_is_subclass(): """ Test that a random sample is an instance of the sampled thing. """ qur = UniqueSubscribers(start="2016-01-01", stop="2016-01-04") sample = qur.random_sample(size=10, sampling_method="bernoulli", estimate_count=False) assert isinstance(sample, UniqueSubscribers)
def gets_parent_attributes(): """ Test that a random sample is an instance of the sampled thing. """ qur = UniqueSubscribers(start="2016-01-01", stop="2016-01-04", level="admin3") sample = qur.random_sample(size=10, method="bernoulli", estimate_count=False) assert sample.level == "admin3"