diff --git a/tests/test_suds.py b/tests/test_suds.py
index ea4b29a..5778126 100644
--- a/tests/test_suds.py
+++ b/tests/test_suds.py
@@ -1332,6 +1332,93 @@ def test_parameter_referencing_missing_element(monkeypatch):
del e # explicitly break circular reference chain in Python 3
+class TestFindTypeInXSDSchemaWithRecursiveTypeDefinitions:
+ """Must not cause an infinite loop."""
+
+ def test_with_recursion_in_imported_schema(self):
+ client = testutils.client_from_wsdl(b("""\
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+"""))
+ assert pytest.raises(
+ suds.TypeNotFound, client.factory.create, 'ns:DoesNotExist')
+
+ def test_with_recursion_in_same_schema(self):
+ client = testutils.client_from_wsdl(b("""\
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+"""))
+ assert pytest.raises(
+ suds.TypeNotFound, client.factory.create, 'ns:DoesNotExist')
+
+
def test_recursive_XSD_import():
url_xsd = "suds://xsd"
xsd = b("""\