def test_add_given_single_item_should_add_elem(self): samples = [1, 2, 3] sut = Dataset(list(samples)) sut.add(4) samples.append(4) self.assertListEqual(samples, sut.get_samples())
def test_add_given_list_should_add_elements(self): samples = [1, 2, 3] sut = Dataset(list(samples)) sut.add([4, 5, 6]) samples.extend([4, 5, 6]) self.assertListEqual(samples, sut.get_samples())
def test_add_give_empty_list_should_do_nothing(self): samples = [1, 2, 3] sut = Dataset(list(samples)) sut.add([]) self.assertListEqual(samples, sut.get_samples())