def Expand_detail_for_single_author__test():
    assert_equal(
        [
            DataLine(
                "myhash1",
                "mydate1",
                "Me",
                32,
                1,
                "foo.txt",
            ),
            DataLine(
                "myhash1",
                "mydate1",
                "Me",
                0,
                10,
                "bar.pl",
            )
        ],
        list( expand_detail(
            CommitDetail(
                "myhash1",
                "mydate1",
                "Me",
                [
                    FileChanges( 32, 1,  "foo.txt" ),
                    FileChanges( 0,  10, "bar.pl" ),
                ]
            ),
            1.0
        ) )
    )
def Expand_detail_for_single_author__test():
    assert_equal([
        DataLine(
            "myhash1",
            "mydate1",
            "Me",
            32,
            1,
            "foo.txt",
        ),
        DataLine(
            "myhash1",
            "mydate1",
            "Me",
            0,
            10,
            "bar.pl",
        )
    ],
                 list(
                     expand_detail(
                         CommitDetail("myhash1", "mydate1", "Me", [
                             FileChanges(32, 1, "foo.txt"),
                             FileChanges(0, 10, "bar.pl"),
                         ]), 1.0)))
def Expand_detail_with_weights_on_lines__test():
    assert_equal([
        DataLine("h", "d", "Me", 9, 0, "foo.txt"),
        DataLine("h", "d", "Me", 0, 3, "bar.pl"),
    ],
                 list(
                     expand_detail(
                         CommitDetail("h", "d", "Me", [
                             FileChanges(32, 1, "foo.txt"),
                             FileChanges(0, 10, "bar.pl"),
                         ]), 0.3)))
def Expand_detail_with_weights_on_lines__test():
    assert_equal(
        [
            DataLine( "h", "d", "Me", 9, 0, "foo.txt" ),
            DataLine( "h", "d", "Me", 0, 3, "bar.pl" ),
        ],
        list( expand_detail(
            CommitDetail(
                "h",
                "d",
                "Me",
                [
                    FileChanges( 32, 1,  "foo.txt" ),
                    FileChanges( 0,  10, "bar.pl" ),
                ]
            ),
            0.3
        ) )
    )