# Path: pbxproj/PBXKey.py
# class PBXKey(str):
#     def __new__(cls, value, parent):
#         obj = str.__new__(cls, value)
#         obj._parent = parent
#         return obj
# 
#     def __repr__(self):
#         comment = self._get_comment()
#         if comment is not None:
#             comment = f' /* {comment} */'
#         else:
#             comment = ''
# 
#         return f'{self.__str__()}{comment}'
# 
#     def get_parent(self):
#         return self._parent
# 
#     def _get_comment(self):
#         return self.get_parent()._resolve_comment(self)


import unittest
from pbxproj.PBXKey import PBXKey



class PBXKeyTest(unittest.TestCase):
    def testGetComment(self):
        key = PBXKey("123", None)
        key._get_comment = lambda: "comment"


# Path: pbxproj/PBXKey.py
# class PBXKey(str):
#     def __new__(cls, value, parent):
#         obj = str.__new__(cls, value)
#         obj._parent = parent
#         return obj
# 
#     def __repr__(self):
#         comment = self._get_comment()
#         if comment is not None:
#             comment = f' /* {comment} */'
#         else:
#             comment = ''
# 
#         return f'{self.__str__()}{comment}'
# 
#     def get_parent(self):
#         return self._parent
# 
#     def _get_comment(self):
#         return self.get_parent()._resolve_comment(self)


# Path: tests/TestPBXKey.py
import unittest
from pbxproj.PBXKey import PBXKey




class PBXKeyTest(unittest.TestCase):
    def testGetComment(self):
        key = PBXKey("123", None)
        key._get_comment = lambda: "comment"


        self.assertEqual(key.__repr__(), "123 /* comment */")