From 676e29885bdfc10a93aeccb97dadc15070bcd570 Mon Sep 17 00:00:00 2001 From: Ben North Date: Tue, 5 Jul 2016 21:46:09 +0100 Subject: [PATCH] Test that check() catches wrong order of elements Fails --- next commit will tighten test. --- example/eigen.py | 2 ++ example/eigen.ref | 1 + 2 files changed, 3 insertions(+) diff --git a/example/eigen.py b/example/eigen.py index 9c4e1ef1..57c516a1 100644 --- a/example/eigen.py +++ b/example/eigen.py @@ -24,6 +24,8 @@ ref = np.array( def check(mat): return 'OK' if np.sum(mat - ref) == 0 else 'NOT OK' +print("should_give_NOT_OK = %s" % check(ref[:, ::-1])) + print("fixed_r = %s" % check(fixed_r())) print("fixed_c = %s" % check(fixed_c())) print("pt_r(fixed_r) = %s" % check(fixed_passthrough_r(fixed_r()))) diff --git a/example/eigen.ref b/example/eigen.ref index bac73be9..03091cc2 100644 --- a/example/eigen.ref +++ b/example/eigen.ref @@ -1,3 +1,4 @@ +should_give_NOT_OK = NOT OK fixed_r = OK fixed_c = OK pt_r(fixed_r) = OK