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__))
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__))
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__))
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" ) )
"""