|
1 | 1 | import unittest |
2 | 2 |
|
3 | | -from hyperbase.hyperedge import hedge, build_atom, str2atom, split_edge_str |
| 3 | +from hyperbase.hyperedge import hedge, build_atom, str_to_atom, split_edge_str |
4 | 4 |
|
5 | 5 |
|
6 | 6 | class TestHyperedge(unittest.TestCase): |
@@ -71,38 +71,38 @@ def test_replace_atom_part2(self): |
71 | 71 | def test_replace_atom_part3(self): |
72 | 72 | self.assertEqual(hedge('(XXX/1/yyy)').replace_atom_part(1, '77'), hedge('(XXX/77/yyy)')) |
73 | 73 |
|
74 | | - def test_str2atom1(self): |
75 | | - self.assertEqual(str2atom('abc'), 'abc') |
| 74 | + def test_str_to_atom1(self): |
| 75 | + self.assertEqual(str_to_atom('abc'), 'abc') |
76 | 76 |
|
77 | | - def test_str2atom2(self): |
78 | | - self.assertEqual(str2atom('abc%'), 'abc%25') |
| 77 | + def test_str_to_atom2(self): |
| 78 | + self.assertEqual(str_to_atom('abc%'), 'abc%25') |
79 | 79 |
|
80 | | - def test_str2atom3(self): |
81 | | - self.assertEqual(str2atom('/abc'), '%2fabc') |
| 80 | + def test_str_to_atom3(self): |
| 81 | + self.assertEqual(str_to_atom('/abc'), '%2fabc') |
82 | 82 |
|
83 | | - def test_str2atom4(self): |
84 | | - self.assertEqual(str2atom('a bc'), 'a%20bc') |
| 83 | + def test_str_to_atom4(self): |
| 84 | + self.assertEqual(str_to_atom('a bc'), 'a%20bc') |
85 | 85 |
|
86 | | - def test_str2atom5(self): |
87 | | - self.assertEqual(str2atom('ab(c'), 'ab%28c') |
| 86 | + def test_str_to_atom5(self): |
| 87 | + self.assertEqual(str_to_atom('ab(c'), 'ab%28c') |
88 | 88 |
|
89 | | - def test_str2atom6(self): |
90 | | - self.assertEqual(str2atom('abc)'), 'abc%29') |
| 89 | + def test_str_to_atom6(self): |
| 90 | + self.assertEqual(str_to_atom('abc)'), 'abc%29') |
91 | 91 |
|
92 | | - def test_str2atom7(self): |
93 | | - self.assertEqual(str2atom('.abc'), '%2eabc') |
| 92 | + def test_str_to_atom7(self): |
| 93 | + self.assertEqual(str_to_atom('.abc'), '%2eabc') |
94 | 94 |
|
95 | | - def test_str2atom8(self): |
96 | | - self.assertEqual(str2atom('a*bc'), 'a%2abc') |
| 95 | + def test_str_to_atom8(self): |
| 96 | + self.assertEqual(str_to_atom('a*bc'), 'a%2abc') |
97 | 97 |
|
98 | | - def test_str2atom9(self): |
99 | | - self.assertEqual(str2atom('ab&c'), 'ab%26c') |
| 98 | + def test_str_to_atom9(self): |
| 99 | + self.assertEqual(str_to_atom('ab&c'), 'ab%26c') |
100 | 100 |
|
101 | | - def test_str2atom10(self): |
102 | | - self.assertEqual(str2atom('abc@'), 'abc%40') |
| 101 | + def test_str_to_atom10(self): |
| 102 | + self.assertEqual(str_to_atom('abc@'), 'abc%40') |
103 | 103 |
|
104 | | - def test_str2atom11(self): |
105 | | - self.assertEqual(str2atom('graph brain/(1).'), 'graph%20brain%2f%281%29%2e') |
| 104 | + def test_str_to_atom11(self): |
| 105 | + self.assertEqual(str_to_atom('graph brain/(1).'), 'graph%20brain%2f%281%29%2e') |
106 | 106 |
|
107 | 107 | def test_split_edge_str1(self): |
108 | 108 | self.assertEqual(split_edge_str('is hyperbase/1 great/1'), ('is', 'hyperbase/1', 'great/1')) |
|
0 commit comments