当前位置: 首页>>代码示例>>Python>>正文


Python Project.pixel_aspect方法代码示例

本文整理汇总了Python中oyProjectManager.models.project.Project.pixel_aspect方法的典型用法代码示例。如果您正苦于以下问题:Python Project.pixel_aspect方法的具体用法?Python Project.pixel_aspect怎么用?Python Project.pixel_aspect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在oyProjectManager.models.project.Project的用法示例。


在下文中一共展示了Project.pixel_aspect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_passing_a_Project_instance_will_fill_the_interface_with_the_project

# 需要导入模块: from oyProjectManager.models.project import Project [as 别名]
# 或者: from oyProjectManager.models.project.Project import pixel_aspect [as 别名]
    def test_passing_a_Project_instance_will_fill_the_interface_with_the_project(self):
        """testing if passing a Project instance will fill the interface with
        the data coming from the given Project instance
        """
        
        new_client = Client(name='Client Agency 1', code='CA1')
        new_client.save()
        
        new_project = Project("Test Project")
        new_project.client = new_client
        new_project.width = 720
        new_project.height = 576
        new_project.pixel_aspect = 1.067
        new_project.fps = 30
        new_project.active = True

        dialog = project_properties.MainDialog(project=new_project)
       
        # now check if the interface is filled properly
        self.assertEqual(
            dialog.name_lineEdit.text(), new_project.name
        )
        
        self.assertEqual(
            dialog.code_lineEdit.text(), new_project.code
        )

        # preset name
        preset_name = dialog.resolution_comboBox.currentText()

        self.assertEqual(
            conf.resolution_presets[preset_name][0],
            new_project.width
        )

        self.assertEqual(
            conf.resolution_presets[preset_name][1],
            new_project.height
        )

        self.assertEqual(
            conf.resolution_presets[preset_name][2],
            new_project.pixel_aspect
        )

        self.assertEqual(
            dialog.fps_spinBox.value(), new_project.fps
        )

        self.assertEqual(
            dialog.active_checkBox.isChecked(), True
        )
        
        # Advanced settings
        self.assertEqual(
            dialog.shot_number_prefix_lineEdit.text(),
            new_project.shot_number_prefix
        )
        
        self.assertEqual(
            dialog.shot_number_padding_spinBox.value(),
            new_project.shot_number_padding
        )
        
#        self.assertEqual(
#            dialog.revision_number_prefix_lineEdit.text(),
#            new_project.rev_number_prefix
#        )
        
#        self.assertEqual(
#            dialog.revision_number_padding_spinBox.value(),
#            new_project.rev_number_padding
#        )
        
#        self.assertEqual(
#            dialog.version_number_prefix_lineEdit.text(),
#            new_project.ver_number_prefix
#        )
        
#        self.assertEqual(
#            dialog.version_number_padding_spinBox.value(),
#            new_project.ver_number_padding
#        )
        
        self.assertEqual(
            dialog.structure_textEdit.toPlainText(),
            new_project.structure
        )
开发者ID:dshlai,项目名称:oyprojectmanager,代码行数:90,代码来源:test_project_properties.py


注:本文中的oyProjectManager.models.project.Project.pixel_aspect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。