def test_create_groupvector_pass0005(self): """Test for create_groupvector (Numpy arrays inputs).""" x = np.array([1, 2, 3]) y = np.array([2, 4, 2]) exp_output = np.array([1, 1, 2, 2, 2, 2, 3, 3]) test_output = bdpy.create_groupvector(x, y) np.testing.assert_array_equal(test_output, exp_output)
def test_create_groupvector_pass0003(self): '''Test for create_groupvector (Numpy array and scalar inputs).''' x = np.array([1, 2, 3]) y = 2 exp_output = np.array([1, 1, 2, 2, 3, 3]) test_output = bdpy.create_groupvector(x, y) np.testing.assert_array_equal(test_output, exp_output)
def test_create_groupvector_pass0002(self): """Test for create_groupvector (list and list inputs).""" x = [1, 2, 3] y = [2, 4, 2] exp_output = [1, 1, 2, 2, 2, 2, 3, 3] test_output = bdpy.create_groupvector(x, y) self.assertTrue((test_output == exp_output).all())
def test_create_groupvector_pass0001(self): '''Test for create_groupvector (list and scalar inputs).''' x = [1, 2, 3] y = 2 exp_output = [1, 1, 2, 2, 3, 3] test_output = bdpy.create_groupvector(x, y) self.assertTrue((test_output == exp_output).all())