# HG changeset patch # User Paul Boddie # Date 1480095370 -3600 # Node ID 379ee212f343039386b8a5f31617202f92ffa10d # Parent 9d5c5b5edf03f46d052334e2a70fe483fc8b269a Simplified test invocation generation. diff -r 9d5c5b5edf03 -r 379ee212f343 optimiser.py --- a/optimiser.py Fri Nov 25 12:46:35 2016 +0100 +++ b/optimiser.py Fri Nov 25 18:36:10 2016 +0100 @@ -404,18 +404,8 @@ # Apply any test. - if test == "specific-type": - accessor = ("__test_specific_type", accessor, test_type) - elif test == "specific-instance": - accessor = ("__test_specific_instance", accessor, test_type) - elif test == "specific-object": - accessor = ("__test_specific_object", accessor, test_type) - elif test == "common-type": - accessor = ("__test_common_type", accessor, test_type) - elif test == "common-instance": - accessor = ("__test_common_instance", accessor, test_type) - elif test == "common-object": - accessor = ("__test_common_object", accessor, test_type) + if test[0] == "test": + accessor = ("__%s_%s_%s" % test, accessor, test_type) # Perform the first or final access. # The access only needs performing if the resulting accessor is used.