Reduce WrongRank tests to the minimum needed

Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
Change-Id: Ideeb67ec4b33b9c6922d6765f4b0eb5ca69bdf89
diff --git a/verif/generator/tosa_error_if.py b/verif/generator/tosa_error_if.py
index 1b6b044..53a3199 100644
--- a/verif/generator/tosa_error_if.py
+++ b/verif/generator/tosa_error_if.py
@@ -680,14 +680,13 @@
 
     @staticmethod
     def evWrongRank(check=False, **kwargs):
-        # From 1 to MAX_TENSOR_RANK+1 inclusively
-        all_ranks = tuple(range(1, gtu.MAX_TENSOR_RANK + 2))
-
         # Make a list of incorrect ranks
         assert "op" in kwargs
         op = kwargs["op"]
         rmin, rmax = op["rank"]
         rank_range = range(rmin, rmax + 1)
+        # From 1 to rmax+1 inclusively
+        all_ranks = tuple(range(1, rmax + 2))
         incorrect_ranks = list(set(all_ranks) - set(rank_range))
         # Remove small incorrect ranks to avoid index errors
         incorrect_ranks = [rank for rank in incorrect_ranks if rank > rmin]