コード例 #1
0
ファイル: test_utils.py プロジェクト: michamos/hepcrawl
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"
コード例 #2
0
ファイル: test_utils.py プロジェクト: drjova/hepcrawl
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"
コード例 #3
0
ファイル: test_utils.py プロジェクト: michamos/hepcrawl
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
コード例 #4
0
ファイル: test_utils.py プロジェクト: drjova/hepcrawl
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