Exemplo n.º 1
0
    def test_shaper_create(self):
        ar_downsample._loadAR()

        glyphspec = {'type': 'Square', 'size': {'value': 3}, 'radius': {'value': 3}}
        self.assertIsInstance(ar_downsample._shaper(glyphspec, False), glyphset.ToRect)
        self.assertIsInstance(ar_downsample._shaper(glyphspec, True), glyphset.ToPoint)
        self.assertIsInstance(ar_downsample._shaper(glyphspec, True), glyphset.ToPoint)
Exemplo n.º 2
0
    def test_shaper_create(self):
        ar_downsample._loadAR()

        glyphspec = {'type': 'Square', 'size': {'value': 3}, 'radius': {'value': 3}}
        self.assertIsInstance(ar_downsample._shaper(glyphspec, False), glyphset.ToRect)
        self.assertIsInstance(ar_downsample._shaper(glyphspec, True), glyphset.ToPoint)
        self.assertIsInstance(ar_downsample._shaper(glyphspec, True), glyphset.ToPoint)
Exemplo n.º 3
0
 def test_shaper_fail(self):
     ar_downsample._loadAR()
     with self.assertRaises(ValueError):
         ar_downsample._shaper({
             'type': 'blah',
             'size': {
                 'value': 3
             }
         }, False)
Exemplo n.º 4
0
 def test_shaper_fail(self):
     ar_downsample._loadAR()
     with self.assertRaises(ValueError):
         ar_downsample._shaper("circle", 3, False)
         ar_downsample._shaper("blah", 3, False)
Exemplo n.º 5
0
 def test_shaper_create(self):
     ar_downsample._loadAR()
     self.assertIsInstance(ar_downsample._shaper("square", 3, False), glyphset.ToRect)
     self.assertIsInstance(ar_downsample._shaper("square", 3, True), glyphset.ToPoint)
     self.assertIsInstance(ar_downsample._shaper("circle", 3, True), glyphset.ToPoint)
Exemplo n.º 6
0
 def test_shaper_fail(self):
     ar_downsample._loadAR()
     with self.assertRaises(ValueError):
         ar_downsample._shaper({'type': 'blah', 'size': {'value': 3}}, False)