def test_make_content_str() -> None: content = make_content_str( "fortran_library()\n", " ", [ PutativeTarget.for_target_type( FortranTests, "path/to", "tests", ["test1.f90", "test2.f90"], kwargs={ "name": "tests", "sources": ("test1.f90", "test2.f90") }, ) ], ) assert (textwrap.dedent(""" fortran_library() fortran_tests( name="tests", sources=[ "test1.f90", "test2.f90", ], ) """).lstrip() == content)
def test_make_content_str() -> None: content = make_content_str( "fortran_library()\n", " ", [ PutativeTarget.for_target_type( FortranTestsTarget, path="path/to", name="tests", triggering_sources=["test1.f90", "test2.f90"], kwargs={"sources": ("test1.f90", "test2.f90")}, ) ], ) assert (dedent("""\ fortran_library() fortran_tests( name="tests", sources=[ "test1.f90", "test2.f90", ], ) """) == content)