def test_lazy_types_loaded_from_same_module(commands: Sequence[str]):
    """Test if lazy types resolved from the same module produce duplication error.

    Note:
      `subprocess` is used since the test must be run as the main module / script.
    """
    result = subprocess.run(
        args=[*commands],
        env=os.environ,
        capture_output=True,
        check=True,
    )

    expected = """\
    type Query {
      typeA: TypeCEdge!
      typeB: TypeCEdge!
    }

    type TypeC {
      name: String!
    }

    type TypeCEdge {
      node: TypeC!
    }
    """

    schema_sdl = result.stdout.decode().replace(os.linesep, "\n")
    assert textwrap.dedent(schema_sdl) == textwrap.dedent(expected)
Test if lazy types resolved from the same module produce duplication error.

    Note:
      `subprocess` is used since the test must be run as the main module / script.
    
tests/schema/test_lazy/test_lazy_generic.py