in pythonFiles/testing_tools/adapter/info.py [0:0]
def __init__(self, *args, **kwargs):
if self.id is None:
raise TypeError("missing id")
if self.name is None:
raise TypeError("missing name")
if self.path is None:
raise TypeError("missing path")
if self.source is None:
raise TypeError("missing source")
else:
srcfile, _, lineno = self.source.rpartition(":")
if not srcfile or not lineno or int(lineno) < 0:
raise ValueError("bad source {!r}".format(self.source))
if self.markers:
badmarkers = [m for m in self.markers if m not in self.MARKERS]
if badmarkers:
raise ValueError("unsupported markers {!r}".format(badmarkers))
if self.parentid is None:
raise TypeError("missing parentid")
if self.kind is None:
raise TypeError("missing kind")
elif self.kind not in self.KINDS:
raise ValueError("unsupported kind {!r}".format(self.kind))