def test_can_get_pdb_code(self): pdb = Pdb() pdb._code = "1xxx" self.assertIs(pdb._code, pdb.code)
def test_can_update_code(self): pdb = Pdb() pdb._code = "1xxx" pdb.code = "2yyy" self.assertEqual(pdb._code, "2yyy")
def test_pdb_repr_with_code(self): pdb = Pdb() pdb._code = "1XXX" pdb._models = ["1", "2", "3"] self.assertEqual(str(pdb), "<Pdb 1XXX (3 models)>")