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__))
Example #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__))
Example #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__))
Example #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__))
Example #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"
            )
        )
Example #8
0
"""
Example #9
0
"""