Example #1
0
def test_coll_cleanforthe():
    """Test author and collaboration getting."""
    forenames = "Jieci"
    keyname = "Wang for the Planck Collaboration"

    name_string = " %s %s " % (forenames, keyname)
    collaboration, author = coll_cleanforthe(name_string)

    assert collaboration == "Planck"
    assert author == "Jieci Wang"
Example #2
0
def test_coll_cleanforthe():
    """Test author and collaboration getting."""
    forenames = "Jieci"
    keyname = "Wang for the Planck Collaboration"

    name_string = " %s %s " % (forenames, keyname)
    collaboration, author = coll_cleanforthe(name_string)

    assert collaboration == "Planck"
    assert author == "Jieci Wang"
Example #3
0
def test_coll_cleanforthe_not_collaboration():
    """Test author and collaboration getting when there is something that looks
    like a collaboration, but it really isn't."""
    forenames = "Jieci"
    keyname = "Wang for the development of some thing"

    name_string = " %s %s " % (forenames, keyname)
    collaboration, author = coll_cleanforthe(name_string)

    assert collaboration == name_string
    assert author is None
Example #4
0
def test_coll_cleanforthe_not_collaboration():
    """Test author and collaboration getting when there is something that looks
    like a collaboration, but it really isn't."""
    forenames = "Jieci"
    keyname = "Wang for the development of some thing"

    name_string = " %s %s " % (forenames, keyname)
    collaboration, author = coll_cleanforthe(name_string)

    assert collaboration == name_string
    assert author is None