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


Python bar.bar方法代码示例

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


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

示例1: test_class

# 需要导入模块: from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import bar [as 别名]
# 或者: from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation.bar import bar [as 别名]
def test_class(self):
        touch(os.path.join(self.subpkgname, 'bar'+os.extsep+'py'), '''\
class bar:
    pass
''')
        from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import bar
        # Module name may be prefixed with "test.", depending on how run.
        self.assertTrue(repr(bar.bar).startswith(
            "<class %s.bar at 0x" % bar.__name__)) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:11,代码来源:test_repr.py

示例2: test_class

# 需要导入模块: from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import bar [as 别名]
# 或者: from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation.bar import bar [as 别名]
def test_class(self):
        self._check_path_limitations('bar')
        write_file(os.path.join(self.subpkgname, 'bar.py'), '''\
class bar:
    pass
''')
        importlib.invalidate_caches()
        from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import bar
        # Module name may be prefixed with "test.", depending on how run.
        self.assertEqual(repr(bar.bar), "<class '%s.bar'>" % bar.__name__) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:12,代码来源:test_reprlib.py

示例3: test_class

# 需要导入模块: from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import bar [as 别名]
# 或者: from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation.bar import bar [as 别名]
def test_class(self):
        touch(os.path.join(self.subpkgname, 'bar'+os.extsep+'py'), '''\
class bar:
    pass
''')
        from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import bar
        # Module name may be prefixed with "test.", depending on how run.
        self.failUnless(repr(bar.bar).startswith(
            "<class %s.bar at 0x" % bar.__name__)) 
开发者ID:ofermend,项目名称:medicare-demo,代码行数:11,代码来源:test_repr.py


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