Exemplo n.º 1
0
    def test_single_bindlink(self):

        # Remember the starting atomspace size.
        starting_size = self.atomspace.size()

        # Run bindlink.
        atom = single_bindlink(self.atomspace, self.bindlink_atom)
        self.assertTrue(atom is not None and atom.value() > 0)

        # Check the ending atomspace size, it should have added one SetLink.
        ending_size = self.atomspace.size()
        self.assertEquals(ending_size, starting_size + 1)

        # The SetLink should have one item in it.
        self.assertEquals(atom.arity, 1)
        self.assertEquals(atom.type, types.SetLink)
Exemplo n.º 2
0
    def test_single_bindlink(self):

        # Remember the starting atomspace size.
        starting_size = self.atomspace.size()

        # Run bindlink.
        atom = single_bindlink(self.atomspace, self.bindlink_atom)
        self.assertTrue(atom is not None and atom.value() > 0)

        # Check the ending atomspace size, it should have added one SetLink.
        ending_size = self.atomspace.size()
        self.assertEquals(ending_size, starting_size + 1)

        # The SetLink should have one item in it.
        self.assertEquals(atom.arity, 1)
        self.assertEquals(atom.type, types.SetLink)
Exemplo n.º 3
0
    def test_single_bindlink(self):

        # Remember the starting atomspace size.
        starting_size = self.atomspace.size()

        # Run bindlink.
        result = single_bindlink(self.atomspace, self.bindlink_handle)
        self.assertTrue(result is not None and result.value() > 0)

        # Check the ending atomspace size, it should have added one ListLink.
        ending_size = self.atomspace.size()
        self.assertEquals(ending_size, starting_size + 1)

        # The ListLink should have one item in it.
        atom = self.atomspace[result]
        self.assertEquals(atom.arity, 1)
        self.assertEquals(atom.type, types.ListLink)
Exemplo n.º 4
0
 def test_single_bindlink(self):
     atom = single_bindlink(self.atomspace, self.bindlink_atom)
     self._check_result_setlink(atom, 1)
Exemplo n.º 5
0
 def test_single_bindlink(self):
     atom = single_bindlink(self.atomspace, self.bindlink_atom)
     self._check_result_setlink(atom, 1)