06-support-ya-markers.patch 803 B

1234567891011121314
  1. --- contrib/python/pytest/py2/_pytest/mark/structures.py (index)
  2. +++ contrib/python/pytest/py2/_pytest/mark/structures.py (working tree)
  3. @@ -316,7 +316,10 @@ class MarkGenerator(object):
  4. # example lines: "skipif(condition): skip the given test if..."
  5. # or "hypothesis: tests which use Hypothesis", so to get the
  6. # marker name we split on both `:` and `(`.
  7. - marker = line.split(":")[0].split("(")[0].strip()
  8. + if line == "ya:external":
  9. + marker = line
  10. + else:
  11. + marker = line.split(":")[0].split("(")[0].strip()
  12. self._markers.add(marker)
  13. # If the name is not in the set of known marks after updating,