예제 #1
0
def test_paraphyletic_genotype6():
    tree_source = "((Sample.bar-6b, Ref.byre-6b), (Ref.baz-6c, (Ref.foo-1a, Sample.floop-1a)));"
    report = StringIO()
    expected_report = ""

    check_tree(tree_source, report)

    assert expected_report == report.getvalue()
예제 #2
0
def test_monophyletic():
    tree_source = "(Ref.foo-1a, (Sample.bar-2b, Ref.baz-2b));"
    report = StringIO()
    expected_report = ''

    check_tree(tree_source, report)

    assert expected_report == report.getvalue()
예제 #3
0
def test_paraphyletic_genotype6():
    tree_source = "((Sample.bar-6b, Ref.byre-6b), (Ref.baz-6c, (Ref.foo-1a, Sample.floop-1a)));"
    report = StringIO()
    expected_report = ""

    check_tree(tree_source, report)

    assert expected_report == report.getvalue()
예제 #4
0
def test_monophyletic():
    tree_source = "(Ref.foo-1a, (Sample.bar-2b, Ref.baz-2b));"
    report = StringIO()
    expected_report = ''

    check_tree(tree_source, report)

    assert expected_report == report.getvalue()
예제 #5
0
def test_paraphyletic():
    tree_source = "((Sample.bar-2b, Ref.byre-2b), (Ref.baz-2c, (Ref.foo-1a, Sample.floop-1a)));"
    report = StringIO()
    expected_report = r"""2 paraphyletic Ref.foo-1a, Sample.floop-1a

      /-Sample.bar-2b
   /-|
  |   \-Ref.byre-2b
--|
  |   /-Ref.baz-2c
   \-|
     |   /-Ref.foo-1a
      \-|
         \-Sample.floop-1a
"""

    check_tree(tree_source, report)

    assert expected_report == report.getvalue()
예제 #6
0
def test_paraphyletic2():
    tree_source = "((Ref.byre-2b, Sample.bar-2b), (Ref.baz-2c, (Ref.foo-1a, Sample.floop-1a)));"
    report = StringIO()
    expected_report = """\
2 paraphyletic Ref.foo-1a, Sample.floop-1a

      /-Ref.byre-2b
   /-|
  |   \-Sample.bar-2b
--|
  |   /-Ref.baz-2c
   \-|
     |   /-Ref.foo-1a
      \-|
         \-Sample.floop-1a
"""

    check_tree(tree_source, report)

    assert expected_report == report.getvalue()
예제 #7
0
def test_polyphyletic():
    tree_source = "((Ref.foo-1a, Sample.bar-2b), (Sample.floop-1a, Ref.baz-2c));"
    report = StringIO()
    expected_report = \
        r"""1a polyphyletic Ref.baz-2c, Sample.bar-2b
1 polyphyletic Ref.baz-2c, Sample.bar-2b
2 polyphyletic Ref.foo-1a, Sample.floop-1a
Sample.bar-2b treed with 1a
Sample.floop-1a treed with 2c

      /-Ref.foo-1a
   /-|
  |   \-Sample.bar-2b
--|
  |   /-Sample.floop-1a
   \-|
      \-Ref.baz-2c
"""

    check_tree(tree_source, report)

    assert expected_report == report.getvalue()
예제 #8
0
def test_polyphyletic():
    tree_source = "((Ref.foo-1a, Sample.bar-2b), (Sample.floop-1a, Ref.baz-2c));"
    report = StringIO()
    expected_report = """\
1a polyphyletic Ref.baz-2c, Sample.bar-2b
1 polyphyletic Ref.baz-2c, Sample.bar-2b
2 polyphyletic Ref.foo-1a, Sample.floop-1a
Sample.bar-2b treed with 1a
Sample.floop-1a treed with 2c

      /-Ref.foo-1a
   /-|
  |   \-Sample.bar-2b
--|
  |   /-Sample.floop-1a
   \-|
      \-Ref.baz-2c
"""

    check_tree(tree_source, report)

    assert expected_report == report.getvalue()