diff --git a/reclass/datatypes/tests/test_exports.py b/reclass/datatypes/tests/test_exports.py
index 6a6dcde..caa0522 100644
--- a/reclass/datatypes/tests/test_exports.py
+++ b/reclass/datatypes/tests/test_exports.py
@@ -62,9 +62,10 @@
     def test_list_if_expr_invquery(self):
         e = {'node1': {'a': 1, 'b': 2}, 'node2': {'a': 3, 'b': 3}, 'node3': {'a': 3, 'b': 2}}
         p = Parameters({'exp': '$[ if exports:b == 2 ]'}, SETTINGS, '')
-        r = {'exp': ['node1', 'node3']}
+        r1 = {'exp': ['node1', 'node3']}
+        r2 = {'exp': ['node3', 'node1']}
         p.interpolate(e)
-        self.assertEqual(p.as_dict(), r)
+        self.assertIn(p.as_dict(), [ r1, r2 ])
 
     def test_if_expr_invquery_wth_and(self):
         e = {'node1': {'a': 1, 'b': 4, 'c': False}, 'node2': {'a': 3, 'b': 4, 'c': True}}
@@ -97,9 +98,10 @@
     def test_list_if_expr_invquery_with_and(self):
         e = {'node1': {'a': 1, 'b': 2}, 'node2': {'a': 3, 'b': 3}, 'node3': {'a': 3, 'b': 4}}
         p = Parameters({'exp': '$[ if exports:b == 2 or exports:b == 4 ]'}, SETTINGS, '')
-        r = {'exp': ['node1', 'node3']}
+        r1 = {'exp': ['node1', 'node3']}
+        r2 = {'exp': ['node3', 'node1']}
         p.interpolate(e)
-        self.assertEqual(p.as_dict(), r)
+        self.assertIn(p.as_dict(), [ r1, r2 ])
 
 if __name__ == '__main__':
     unittest.main()
diff --git a/reclass/datatypes/tests/test_parameters.py b/reclass/datatypes/tests/test_parameters.py
index 6ab6c93..b15f8ce 100644
--- a/reclass/datatypes/tests/test_parameters.py
+++ b/reclass/datatypes/tests/test_parameters.py
@@ -124,13 +124,15 @@
     def test_construct_wrong_type(self):
         with self.assertRaises(TypeError) as e:
             self._construct_mocked_params(str('wrong type'))
-        self.assertEqual(e.exception.message, "Cannot merge <type 'str'> objects into Parameters")
+        self.assertIn(str(e.exception), [ "Cannot merge <type 'str'> objects into Parameters",    # python 2
+                                          "Cannot merge <class 'str'> objects into Parameters" ])  # python 3
 
     def test_merge_wrong_type(self):
         p, b = self._construct_mocked_params()
         with self.assertRaises(TypeError) as e:
             p.merge(str('wrong type'))
-        self.assertEqual(e.exception.message, "Cannot merge <type 'str'> objects into Parameters")
+        self.assertIn(str(e.exception), [ "Cannot merge <type 'str'> objects into Parameters",    # python 2
+                                          "Cannot merge <class 'str'> objects into Parameters"])   # python 3
 
     def test_get_dict(self):
         p, b = self._construct_mocked_params(SIMPLE)
@@ -381,7 +383,9 @@
         p = Parameters(d, SETTINGS, '')
         with self.assertRaises(InfiniteRecursionError) as e:
             p.interpolate()
-        self.assertEqual(e.exception.message, "-> \n   Infinite recursion: ${foo}, at bar")
+        # interpolation can start with foo or bar
+        self.assertIn(e.exception.message, [ "-> \n   Infinite recursion: ${foo}, at bar",
+                                             "-> \n   Infinite recursion: ${bar}, at foo"])
 
     def test_nested_references(self):
         d = {'a': '${${z}}', 'b': 2, 'z': 'b'}
@@ -631,7 +635,9 @@
         p1 = Parameters({'alpha': '${gamma}', 'beta': '${gamma}'}, SETTINGS, '')
         with self.assertRaises(ResolveErrorList) as error:
             p1.interpolate()
-        self.assertEqual(error.exception.message, "-> \n   Cannot resolve ${gamma}, at alpha\n   Cannot resolve ${gamma}, at beta")
+        # interpolation can start with either alpha or beta
+        self.assertIn(error.exception.message, [ "-> \n   Cannot resolve ${gamma}, at alpha\n   Cannot resolve ${gamma}, at beta",
+                                                    "-> \n   Cannot resolve ${gamma}, at beta\n   Cannot resolve ${gamma}, at alpha"])
 
     def test_force_single_resolve_error(self):
         settings = copy.deepcopy(SETTINGS)
@@ -639,7 +645,9 @@
         p1 = Parameters({'alpha': '${gamma}', 'beta': '${gamma}'}, settings, '')
         with self.assertRaises(ResolveError) as error:
             p1.interpolate()
-        self.assertEqual(error.exception.message, "-> \n   Cannot resolve ${gamma}, at alpha")
+        # interpolation can start with either alpha or beta
+        self.assertIn(error.exception.message, [ "-> \n   Cannot resolve ${gamma}, at alpha",
+                                                 "-> \n   Cannot resolve ${gamma}, at beta"])
 
     def test_ignore_overwriten_missing_reference(self):
         settings = copy.deepcopy(SETTINGS)
