コード例 #1
0
    def test_instance(self):
        touch(os.path.join(self.subpkgname, 'baz.py'), '''\
class baz:
    pass
''')
        from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import baz
        ibaz = baz.baz()
        self.assertTrue(repr(ibaz).startswith(
            "<%s.baz object at 0x" % baz.__name__))
コード例 #2
0
ファイル: test_repr.py プロジェクト: circinusX1/minimarmfs
    def test_instance(self):
        touch(os.path.join(self.subpkgname, 'baz'+os.extsep+'py'), '''\
class baz:
    pass
''')
        from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import baz
        ibaz = baz.baz()
        self.failUnless(repr(ibaz).startswith(
            "<%s.baz instance at 0x" % baz.__name__))
コード例 #3
0
    def test_instance(self):
        touch(os.path.join(self.subpkgname, 'baz.py'), '''\
class baz:
    pass
''')
        from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import baz
        ibaz = baz.baz()
        self.assertTrue(
            repr(ibaz).startswith("<%s.baz object at 0x" % baz.__name__))
コード例 #4
0
ファイル: test_reprlib.py プロジェクト: timm/timmnix
    def test_instance(self):
        self._check_path_limitations('baz')
        write_file(os.path.join(self.subpkgname, 'baz.py'), '''\
class baz:
    pass
''')
        importlib.invalidate_caches()
        from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import baz
        ibaz = baz.baz()
        self.assertTrue(repr(ibaz).startswith(
            "<%s.baz object at 0x" % baz.__name__))
コード例 #5
0
ファイル: test_reprlib.py プロジェクト: BrandonOsas/WEB-DEV
    def test_instance(self):
        self._check_path_limitations('baz')
        write_file(os.path.join(self.subpkgname, 'baz.py'), '''\
class baz:
    pass
''')
        importlib.invalidate_caches()
        from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import baz
        ibaz = baz.baz()
        self.assertTrue(repr(ibaz).startswith(
            "<%s.baz object at 0x" % baz.__name__))
コード例 #6
0
    def test_instance(self):
        touch(
            os.path.join(self.subpkgname, "baz" + os.extsep + "py"),
            """\
class baz:
    pass
""",
        )
        from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import (
            baz,
        )

        ibaz = baz.baz()
        self.assertTrue(repr(ibaz).startswith("<%s.baz instance at 0x" % baz.__name__))
コード例 #7
0
    def test_instance(self):
        touch(
            os.path.join(self.subpkgname, "baz" + os.extsep + "py"),
            """\
class baz:
    pass
""",
        )
        from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import (
            baz,
        )

        ibaz = baz.baz()
        self.failUnless(
            repr(ibaz).startswith(
                "<areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation.baz.baz instance"
            )
        )
コード例 #8
0
ファイル: test_repr.py プロジェクト: mcyril/ravel-ftn
"""
コード例 #9
0
"""