class_docstr: TestRun defines the set of tests that should be run together in a single pytest invocation.
  It'll either be a whole test file or a subset of a test file.
  
  This class assumes that we won't always know the full set of TestClasses in a test file.
  So it's designed to include or exclude explicitly requested TestClasses, while having accepting
  that there will be an ambiguous set of "unknown" test classes that are not expliclty called out.
  Those manifest as tests that haven't been explicitly excluded.
class_docstr_tok: ["TestRun","defines","the","set","of","tests","that","should","be","run","together","in","a","single","pytest","invocation",".","It","'ll","either","be","a","whole","test","file","or","a","subset","of","a","test","file",".","This","class","assumes","that","we","wo","n't","always","know","the","full","set","of","TestClasses","in","a","test","file",".","So","it","'s","designed","to","include","or","exclude","explicitly","requested","TestClasses",",","while","having","accepting","that","there","will","be","an","ambiguous","set","of","``","unknown","''","test","classes","that","are","not","expliclty","called","out",".","Those","manifest","as","tests","that","have","n't","been","explicitly","excluded","."]
code: def contains(self, test: "TestRun") -> bool:
      if self.test_file != test.test_file:
          return False
  
      if self.is_full_file():
          return True  # self contains all tests
  
      if test.is_full_file():
          return False  # test contains all tests, but self doesn't
  
      # Does self exclude a subset of what test excldes?
      if test._excluded:
          return test._excluded.issubset(self._excluded)
  
      # Does self include everything test includes?
      if self._included:
          return test._included.issubset(self._included)
  
      # Getting to here means that test includes and self excludes
      # Does self exclude anything test includes? If not, we're good
      return not self._excluded.intersection(test._included)
  
imports: from copy import copy
  from functools import total_ordering
  from typing import Iterable, List, Optional, Set, Tuple, Union
label_desc: Use image node_id 8 for calling the TestRun obj's underlying member method code with example usage: obj.contains(test) and returns: unknown, False, True, False, test, test