예제 #1
0
    def test_camera_attribute_is_set_to_None(self):
        """testing if setting the camera attribute to None will raise a
        TypeError
        """
        rs = RenderSlicer(camera=self.camera)
        with self.assertRaises(TypeError) as cm:
            rs.camera = None

        self.assertEqual(str(cm.exception), 'Please supply a Maya camera')
예제 #2
0
    def test_camera_attribute_is_set_to_a_non_camera_object(self):
        """testing if setting the camera attribute to a non camera object will
        raise a TypeError
        """
        rs = RenderSlicer(camera=self.camera)
        with self.assertRaises(TypeError) as cm:
            rs.camera = 'not a maya camera'

        self.assertEqual(
            str(cm.exception),
            'RenderSlicer.camera should be a Maya camera, not str')
예제 #3
0
    def test_camera_attribute_is_set_to_a_non_camera_object(self):
        """testing if setting the camera attribute to a non camera object will
        raise a TypeError
        """
        rs = RenderSlicer(camera=self.camera)
        with self.assertRaises(TypeError) as cm:
            rs.camera = 'not a maya camera'

        self.assertEqual(
            str(cm.exception),
            'RenderSlicer.camera should be a Maya camera, not str'
        )
예제 #4
0
    def test_camera_attribute_is_set_to_None(self):
        """testing if setting the camera attribute to None will raise a
        TypeError
        """
        rs = RenderSlicer(camera=self.camera)
        with self.assertRaises(TypeError) as cm:
            rs.camera = None

        self.assertEqual(
            str(cm.exception),
            'Please supply a Maya camera'
        )