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
    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__))
    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
    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
    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__))
    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
"""
示例#9
0
"""