def test_expression_given_by_query(self): ARR = sdb.ones((4)) assert _format_operand(afl.transpose(ARR)) == "transpose(%s)" % ARR.name
def test_expression_given_by_result_name_if_evaluated(self): ARR = sdb.ones((4)) exp = afl.transpose(ARR) exp.eval() assert _format_operand(exp) == exp.eval().name
def test_scalar(self): assert _format_operand('x') == 'x' assert _format_operand(3) == '3'
def test_scidbarray_givnen_by_name(self): ARR = sdb.ones((4)) assert _format_operand(ARR) == ARR.name
def test_expression_given_by_result_name_if_evaluated(self): ARR = sdb.ones((4)) exp = afl.normalize(ARR) exp.eval() assert _format_operand(exp) == exp.eval().name
def test_expression_given_by_query(self): ARR = sdb.ones((4)) assert _format_operand(afl.normalize(ARR)) == "normalize(%s)" % ARR.name
def test_scalar(self): assert _format_operand("x") == "x" assert _format_operand(3) == "3"