Debian Codegraph @

FaCT++.Python/pyfactxx/tests/test_one_to_one.py

raw symbols SCIP
1 #
2 # pyfactxx - Python interface to FaCT++ reasoner
3 #
4 # Copyright (C) 2016-2018 by Artur Wroblewski <[email protected]>
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #
19
20
21 def test_diff_concepts(reasoner):
22 """Test different concepts"""
23 c1 = reasoner.concept('C1')
24 c2 = reasoner.concept('C2')
25 assert c1 is not c2
26
27
28 def test_same_concepts(reasoner):
29 """Test same concepts"""
30 c1 = reasoner.concept('C')
31 c2 = reasoner.concept('C')
32 assert c1 is c2
33
34
35 def test_diff_individuals(reasoner):
36 """Test different individuals"""
37 i1 = reasoner.individual('i1')
38 i2 = reasoner.individual('i2')
39 assert i1 is not i2
40
41
42 def test_same_individuals(reasoner):
43 """Test same individuals"""
44 i1 = reasoner.individual('i')
45 i2 = reasoner.individual('i')
46 assert i1 is i2
47
48
49 def test_diff_object_roles(reasoner):
50 """Test different object roles"""
51 r1 = reasoner.object_role('r1')
52 r2 = reasoner.object_role('r2')
53 assert r1 is not r2
54
55
56 def test_same_object_roles(reasoner):
57 """Test same object roles"""
58 r1 = reasoner.object_role('r')
59 r2 = reasoner.object_role('r')
60 assert r1 is r2
61
62
63 def test_diff_data_roles(reasoner):
64 """Test different data roles"""
65 r1 = reasoner.data_role('r1')
66 r2 = reasoner.data_role('r2')
67 assert r1 is not r2
68
69
70 def test_same_data_roles(reasoner):
71 """Test same data roles"""
72 r1 = reasoner.data_role('r')
73 r2 = reasoner.data_role('r')
74 assert r1 is r2
75
76 # vim: sw=4:et:ai