예제 #1
0
파일: tests.py 프로젝트: nickmellor/DataGen
 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"))
예제 #2
0
파일: tests.py 프로젝트: nickmellor/DataGen
 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"))
예제 #3
0
파일: tests.py 프로젝트: nickmellor/DataGen
def numbered_sample_output_file(no):
    return test_data_output_file('sample-' + str(no) + '.csv')
예제 #4
0
파일: tests.py 프로젝트: nickmellor/DataGen
def numbered_sample_output_file(no):
    return test_data_output_file('sample-' + str(no) + '.csv')