def test_tsv2triple(self): from lingpy.basic.ops import tsv2triple, triple2tsv out = self.tmp_path('test') triples = tsv2triple(self.wordlist, out) self.assertIsInstance(triple2tsv(out), list) self.assertIsInstance(triple2tsv(triples, output='dict'), dict)
def test_tsv2triple(self): from lingpy.basic.ops import tsv2triple, triple2tsv out = self.tmp_path('test') tsv2triple(self.wordlist, str(out)) table = triple2tsv(str(out)) self.assertIsInstance(table, list)
def test_tsv2triple(self): out = self.tmp_path('test') triples = tsv2triple(self.wordlist, out) self.assertIsInstance(triple2tsv(out), list) self.assertIsInstance(triple2tsv(triples, output='dict'), dict)
def test_tsv2triple(tmppath, wordlist): out = tmppath / 'test' triples = tsv2triple(wordlist, str(out)) assert isinstance(triple2tsv(str(out)), list) assert isinstance(triple2tsv(triples, output='dict'), dict)