def testConvertHBF1_0toHBF1_2(self):
     for t in RT_DIRS:
         obj, b_expect = _get_pair(t, 'v1.0.json', 'v1.2.json')
         if obj is None:
             continue
         b = convert_nexson_format(obj, BY_ID_HONEY_BADGERFISH)
         equal_blob_check(self, '', b, b_expect)
 def testConvertBFtoHBF1_0(self):
     for t in RT_DIRS:
         obj, b_expect = _get_pair(t, 'v0.0.json', 'v1.0.json')
         if obj is None:
             continue
         h = convert_nexson_format(obj, DIRECT_HONEY_BADGERFISH)
         equal_blob_check(self, '', h, b_expect)
Beispiel #3
0
 def testConvertHBF1_0toHBF1_2(self):
     for t in RT_DIRS:
         obj, b_expect = _get_pair(t, 'v1.0.json', 'v1.2.json')
         if obj is None:
             continue
         b = convert_nexson_format(obj, BY_ID_HONEY_BADGERFISH)
         equal_blob_check(self, '', b, b_expect)
Beispiel #4
0
 def testConvertBFtoHBF1_0(self):
     for t in RT_DIRS:
         obj, b_expect = _get_pair(t, 'v0.0.json', 'v1.0.json')
         if obj is None:
             continue
         h = convert_nexson_format(obj, DIRECT_HONEY_BADGERFISH)
         equal_blob_check(self, '', h, b_expect)
 def testCanConvert(self):
     inp = pathmap.nexson_obj('merge/merge-input.v1.2.json')
     expected = pathmap.nexson_obj('merge/merge-expected.v1.2.json')
     expected = sort_arbitrarily_ordered_nexson(expected)
     inp = sort_arbitrarily_ordered_nexson(inp)
     self.assertNotEqual(inp, expected)
     merge_otus_and_trees(inp)
     equal_blob_check(self, '', inp, expected)
 def testCanConvert(self):
     inp = pathmap.nexson_obj('merge/merge-input.v1.2.json')
     expected = pathmap.nexson_obj('merge/merge-expected.v1.2.json')
     expected = sort_arbitrarily_ordered_nexson(expected)
     inp = sort_arbitrarily_ordered_nexson(inp)
     self.assertNotEqual(inp, expected)
     merge_otus_and_trees(inp)
     equal_blob_check(self, '', inp, expected)
Beispiel #7
0
 def testTreeBaseImport(self):
     fp = pathmap.nexml_source_path('S15515.xml')
     n = get_ot_study_info_from_treebase_nexml(src=fp,
                                               merge_blocks=True,
                                               sort_arbitrary=True)
     expected = pathmap.nexson_obj('S15515.json')
     equal_blob_check(self, 'S15515', n, expected)
     self.assertTrue(expected == n)
 def testTreeBaseImport(self):
     fp = pathmap.nexml_source_path('S15515.xml')
     n = get_ot_study_info_from_treebase_nexml(src=fp,
                                               merge_blocks=True,
                                               sort_arbitrary=True)
     expected = pathmap.nexson_obj('S15515.json')
     equal_blob_check(self, 'S15515', n, expected)
     self.assertTrue(expected == n)
 def testConvertHBF1_2toHBF1_0(self):
     for t in RT_DIRS:
         obj, b_expect = _get_pair(t, 'v1.2.json', 'v1.0.json')
         if obj is None:
             continue
         b = convert_nexson_format(obj, DIRECT_HONEY_BADGERFISH)
         sort_arbitrarily_ordered_nexson(b_expect)
         sort_arbitrarily_ordered_nexson(b)
         equal_blob_check(self, '', b, b_expect)
 def testConvertHBF1_2toBF(self):
     for t in RT_DIRS:
         obj, b_expect = _get_pair(t, 'v1.2.json', 'v0.0.json')
         if obj is None:
             continue
         b = convert_nexson_format(obj, BADGER_FISH_NEXSON_VERSION)
         sort_arbitrarily_ordered_nexson(b_expect)
         sort_arbitrarily_ordered_nexson(b)
         equal_blob_check(self, '', b, b_expect)
 def testConvertHBF1_0toBF(self):
     for t in RT_DIRS:
         obj, b_expect = _get_pair(t, 'v1.0.json', 'v0.0.json')
         if obj is None:
             continue
         b = convert_nexson_format(obj, BADGER_FISH_NEXSON_VERSION)
         sort_meta_elements(b_expect)
         sort_meta_elements(b)
         equal_blob_check(self, '', b, b_expect)
Beispiel #12
0
 def testConvertHBF1_2toHBF1_0(self):
     for t in RT_DIRS:
         obj, b_expect = _get_pair(t, 'v1.2.json', 'v1.0.json')
         if obj is None:
             continue
         b = convert_nexson_format(obj, DIRECT_HONEY_BADGERFISH)
         sort_arbitrarily_ordered_nexson(b_expect)
         sort_arbitrarily_ordered_nexson(b)
         equal_blob_check(self, '', b, b_expect)
Beispiel #13
0
 def testConvertHBF1_2toBF(self):
     for t in RT_DIRS:
         obj, b_expect = _get_pair(t, 'v1.2.json', 'v0.0.json')
         if obj is None:
             continue
         b = convert_nexson_format(obj, BADGER_FISH_NEXSON_VERSION)
         sort_arbitrarily_ordered_nexson(b_expect)
         sort_arbitrarily_ordered_nexson(b)
         equal_blob_check(self, '', b, b_expect)
Beispiel #14
0
 def testConvertHBF1_0toBF(self):
     for t in RT_DIRS:
         obj, b_expect = _get_pair(t, 'v1.0.json', 'v0.0.json')
         if obj is None:
             continue
         b = convert_nexson_format(obj, BADGER_FISH_NEXSON_VERSION)
         sort_meta_elements(b_expect)
         sort_meta_elements(b)
         equal_blob_check(self, '', b, b_expect)
Beispiel #15
0
 def testTreeBaseImport(self):
     fp = pathmap.nexml_source_path('S15515.xml')
     n = get_ot_study_info_from_treebase_nexml(src=fp,
                                               merge_blocks=True,
                                               sort_arbitrary=True)
     # did we successfully coerce its DOI to the required URL form?
     self.assertTrue('@href' in n['nexml']['^ot:studyPublication'])
     test_doi = n['nexml']['^ot:studyPublication']['@href']
     self.assertTrue(test_doi == doi2url(test_doi))
     # furthermore, the output should exactly match our test file
     expected = pathmap.nexson_obj('S15515.json')
     equal_blob_check(self, 'S15515', n, expected)
     self.assertTrue(expected == n)
 def testTreeBaseImport(self):
     fp = pathmap.nexml_source_path('S15515.xml')
     n = get_ot_study_info_from_treebase_nexml(src=fp,
                                               merge_blocks=True,
                                               sort_arbitrary=True)
     # did we successfully coerce its DOI to the required URL form?
     self.assertTrue('@href' in n['nexml']['^ot:studyPublication'])
     test_doi = n['nexml']['^ot:studyPublication']['@href']
     self.assertTrue(test_doi == doi2url(test_doi))
     # furthermore, the output should exactly match our test file
     expected = pathmap.nexson_obj('S15515.json')
     equal_blob_check(self, 'S15515', n, expected)
     self.assertTrue(expected == n)