Ejemplo n.º 1
0
 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"))
Ejemplo n.º 2
0
 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"))
Ejemplo n.º 3
0
def numbered_sample_output_file(no):
    return test_data_output_file('sample-' + str(no) + '.csv')
Ejemplo n.º 4
0
def numbered_sample_output_file(no):
    return test_data_output_file('sample-' + str(no) + '.csv')