def test_unslice_will_set_the_is_sliced_attribute_correctly(self): """testing if unslice() method will set the is_sliced attribute\ correctly """ rs = RenderSlicer(camera=self.camera) rs.slice(10, 10) self.assertTrue(rs.is_sliced) rs.unslice() self.assertFalse(rs.is_sliced)
def test_unslice_will_set_the_pixel_aspect_to_1(self): """testing if the unslice() method will set the pixel aspect to 1 """ dres = pm.PyNode('defaultResolution') dres.width.set(1920) dres.height.set(1080) dres.pixelAspect.set(2.5) rs = RenderSlicer(self.camera) rs.slice(10, 10) rs.unslice() self.assertEqual(dres.pixelAspect.get(), 1) self.assertEqual(dres.width.get(), 1920) self.assertEqual(dres.height.get(), 1080)
def test_unslice_will_restore_original_render_resolution(self): """unslice will restore the original render resolution """ dres = pm.PyNode('defaultResolution') dres.width.set(960) dres.height.set(540) rs = RenderSlicer(camera=self.camera) rs.slice(10, 10) self.assertEqual(dres.width.get(), 96) self.assertEqual(dres.height.get(), 54) rs.unslice() self.assertEqual(dres.width.get(), 960) self.assertEqual(dres.height.get(), 540)