예제 #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')