예제 #1
0
파일: test_tile.py 프로젝트: while/pandas
    def test_label_formatting(self):
        self.assertEquals(tmod._trim_zeros('1.000'), '1')

        # it works
        result = cut(np.arange(11.), 2)

        result = cut(np.arange(11.) / 1e10, 2)
예제 #2
0
파일: test_tile.py 프로젝트: JWCornV/pandas
    def test_label_formatting(self):
        self.assertEquals(tmod._trim_zeros('1.000'), '1')

        # it works
        result = cut(np.arange(11.), 2)

        result = cut(np.arange(11.) / 1e10, 2)
예제 #3
0
    def test_label_formatting(self):
        self.assertEqual(tmod._trim_zeros('1.000'), '1')

        # it works
        result = cut(np.arange(11.), 2)

        result = cut(np.arange(11.) / 1e10, 2)

        # #1979, negative numbers

        result = tmod._format_label(-117.9998, precision=3)
        self.assertEqual(result, '-118')
        result = tmod._format_label(117.9998, precision=3)
        self.assertEqual(result, '118')
예제 #4
0
    def test_label_formatting(self):
        self.assertEqual(tmod._trim_zeros('1.000'), '1')

        # it works
        result = cut(np.arange(11.), 2)

        result = cut(np.arange(11.) / 1e10, 2)

        # #1979, negative numbers

        result = tmod._format_label(-117.9998, precision=3)
        self.assertEqual(result, '-118')
        result = tmod._format_label(117.9998, precision=3)
        self.assertEqual(result, '118')
예제 #5
0
    def test_label_formatting(self):
        self.assertEquals(tmod._trim_zeros("1.000"), "1")

        # it works
        result = cut(np.arange(11.0), 2)

        result = cut(np.arange(11.0) / 1e10, 2)

        # #1979, negative numbers

        result = tmod._format_label(-117.9998, precision=3)
        self.assertEquals(result, "-118")
        result = tmod._format_label(117.9998, precision=3)
        self.assertEquals(result, "118")