def __str__(self): """Representation as a GDL string.""" with Frame(): return prolog_term_to_prefix_gdl(self._term_record.get())
def test_variable_term(self): assert_equal(prolog_term_to_prefix_gdl(Term())[0], '?')
def test_compound_term(self): assert_equal(prolog_term_to_prefix_gdl( Functor('foo', 2)(Term.from_atom_name('bar'), Term.from_atom_name('2'))), '(foo bar 2)')
def test_atom_term(self): assert_equal(prolog_term_to_prefix_gdl(Term.from_atom_name('foo')), 'foo')