示例#1
0
 def test_get_data_divs(self):
     m = Mapper()
     self.assertEqual(m._get_data_divs(u"part1#part2#part3", False), [u"part1#part2#part3"])
     self.assertEqual(m._get_data_divs(u"part1#part2#part3", True), [u"part1", u"part2", u"part3"])
     self.assertEqual(m._get_data_divs(u"part\#1#part2#part\#3", True), [u"part#1", u"part2", u"part#3"])
     self.assertEqual(
         m._get_data_divs(u"part\#1 and \#1a#part2#part\#3", True), [u"part#1 and #1a", u"part2", u"part#3"]
     )
示例#2
0
 def test_get_data_divs(self):
     m = Mapper('mods', [])
     self.assertEqual(m._get_data_divs(u'part1#part2#part3', False), [u'part1#part2#part3'])
     self.assertEqual(m._get_data_divs(u'part1#part2#part3', True), [u'part1', u'part2', u'part3'])
     self.assertEqual(m._get_data_divs(u'part\#1#part2#part\#3', True), [u'part#1', u'part2', u'part#3'])
     self.assertEqual(m._get_data_divs(u'part\#1 and \#1a#part2#part\#3', True), [u'part#1 and #1a', u'part2', u'part#3'])