def test_RP_save_zero_or_neg_sample(self): """ RandomPerson().save should raise exception with negative sample sizes """ with self.assertRaises(NegSampleSizeException): RandomContact().save( no_of_people=-1, output_filename=test_data_output_file("sample-minus1-items")) with self.assertRaises(NegSampleSizeException): RandomContact().save( no_of_people=-1, output_filename=test_data_output_file("sample-zero-items"))
def test_RP_save_zero_or_neg_sample(self): """ RandomPerson().save should raise exception with negative sample sizes """ with self.assertRaises(NegSampleSizeException): RandomContact().save( no_of_people=-1, output_filename = test_data_output_file("sample-minus1-items")) with self.assertRaises(NegSampleSizeException): RandomContact().save( no_of_people=-1, output_filename = test_data_output_file("sample-zero-items"))
def numbered_sample_output_file(no): return test_data_output_file('sample-' + str(no) + '.csv')