def test_net_test_inputs(self): ntl = NetTestLoader(dummyArgsWithFile) ntl.loadNetTestString(net_test_string_with_file) ntl.checkOptions() nt = NetTest(ntl.getTestCases(), ntl.getTestDetails(), None) yield nt.initialize() for test_class, test_methods in nt.testCases: self.assertEqual(len(list(test_class.inputs)), 10)
def test_net_test_inputs(self): ntl = NetTestLoader(dummyArgsWithFile) ntl.loadNetTestString(net_test_string_with_file) ntl.checkOptions() nt = NetTest(ntl.getTestCases(), ntl.getTestDetails(), None) yield nt.initialize() for test_class, test_methods in nt.testCases: self.assertEqual(len(list(test_class.inputs)), 10)
def test_generate_measurements_size(self): ntl = NetTestLoader(dummyArgsWithFile) ntl.loadNetTestString(net_test_string_with_file) ntl.checkOptions() net_test = NetTest(ntl.getTestCases(), ntl.getTestDetails(), None) yield net_test.initialize() measurements = list(net_test.generateMeasurements()) self.assertEqual(len(measurements), 20)
def test_generate_measurements_size(self): ntl = NetTestLoader(dummyArgsWithFile) ntl.loadNetTestString(net_test_string_with_file) ntl.checkOptions() net_test = NetTest(ntl.getTestCases(), ntl.getTestDetails(), None) yield net_test.initialize() measurements = list(net_test.generateMeasurements()) self.assertEqual(len(measurements), 20)
def test_net_test_inputs(self): ntl = NetTestLoader(dummyArgsWithFile) ntl.loadNetTestString(net_test_string_with_file) ntl.checkOptions() nt = NetTest(ntl.getTestCases(), ntl.getTestDetails(), None) nt.initializeInputProcessor() # XXX: if you use the same test_class twice you will have consumed all # of its inputs! tested = set([]) for test_instance, test_method, inputs in nt.testInstances: self.assertEqual(len(list(inputs)), 10)