示例#1
0
 def test_zero(self):
     res = duviz.bar(0, 'x')
     self.assertEqual(res, '')
示例#2
0
 def test_default(self):
     res = duviz.bar(10, 'abcd')
     self.assertEqual(res, '[--abcd--]')
示例#3
0
 def test_one(self):
     res = duviz.bar(1, "x", one="y")
     self.assertEqual(res, "y")
示例#4
0
 def test_one(self):
     res = duviz.bar(1, 'x', one='y')
     self.assertEqual(res, 'y')
示例#5
0
 def test_zero(self):
     res = duviz.bar(0, 'x')
     self.assertEqual(res, '')
示例#6
0
 def test_fill(self):
     res = duviz.bar(10, "abcd", fill="+")
     self.assertEqual(res, "[++abcd++]")
示例#7
0
 def test_zero(self):
     res = duviz.bar(0, "x")
     self.assertEqual(res, "")
示例#8
0
 def test_unicode(self):
     res = duviz.bar(10, 'åßc∂', fill='+')
     self.assertEqual(res, '[++åßc∂++]')
示例#9
0
 def test_unicode(self):
     res = duviz.bar(10, u'åßc∂', fill='+')
     self.assertEqual(res, u'[++åßc∂++]')
示例#10
0
 def test_unicode2(self):
     label = b'\xc3\xb8o\xcc\x82o\xcc\x88o\xcc\x81a\xcc\x8a'.decode('utf8')
     res = duviz.bar(9, label, fill='+')
     self.assertEqual(res, u'[+øôöóå+]')
示例#11
0
 def test_fill(self):
     res = duviz.bar(10, u'abcd', fill='+')
     self.assertEqual(res, u'[++abcd++]')
示例#12
0
 def test_left_and_right(self):
     res = duviz.bar(12, u'abcd', left='<<', right='**')
     self.assertEqual(res, u'<<--abcd--**')
示例#13
0
 def test_default(self):
     res = duviz.bar(10, u'abcd')
     self.assertEqual(res, u'[--abcd--]')
示例#14
0
 def test_left_and_right(self):
     res = duviz.bar(12, 'abcd', left='<<', right='**')
     self.assertEqual(res, '<<--abcd--**')
示例#15
0
 def test_default(self):
     res = duviz.bar(10, "abcd")
     self.assertEqual(res, "[--abcd--]")
示例#16
0
 def test_fill(self):
     res = duviz.bar(10, 'abcd', fill='+')
     self.assertEqual(res, '[++abcd++]')
示例#17
0
 def test_left_and_right(self):
     res = duviz.bar(12, "abcd", left="<<", right="**")
     self.assertEqual(res, "<<--abcd--**")
示例#18
0
 def test_unicode2(self):
     label = b'\xc3\xb8o\xcc\x82o\xcc\x88o\xcc\x81a\xcc\x8a'.decode('utf8')
     res = duviz.bar(9, label, fill='+')
     self.assertEqual(res, '[+øôöóå+]')
示例#19
0
 def test_one(self):
     res = duviz.bar(1, 'x', one='y')
     self.assertEqual(res, 'y')