#4077 new defect

Many regexs in Tahoe tests are invalid

Reported by: itamarst Owned by:
Priority: normal Milestone: undecided
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

typechecks: commands[1]> mypy --python-version=3.12 src
src/allmydata/test/cli/test_backup.py:47: SyntaxWarning: invalid escape sequence '\d'
  "(\d)+ files skipped, "
src/allmydata/test/cli/test_backup.py:48: SyntaxWarning: invalid escape sequence '\d'
  "(\d+) directories created \((\d+) reused\), "
src/allmydata/test/cli/test_backup.py:49: SyntaxWarning: invalid escape sequence '\d'
  "(\d+) directories skipped", out)
src/allmydata/test/cli/test_cli.py:775: SyntaxWarning: invalid escape sequence '\('
  in_pending_msg_regex = "ran out of shares: complete= pending=Share\(.+\) overdue= unused= need 3"
src/allmydata/test/web/test_web.py:1971: SyntaxWarning: invalid escape sequence '\s'
  CSS_STYLE=re.compile(b'toolbar\s{.+text-align:\scenter.+toolbar-item.+display:\sinline',re.DOTALL)
src/allmydata/test/test_runner.py:306: SyntaxWarning: invalid escape sequence '\S'
  self.failIf(re.search("[\S][^\.!?]$", line), (line,))
src/allmydata/util/i2p_provider.py:192: SyntaxWarning: invalid escape sequence '\:'
  escaped_sam_port = sam_port.replace(':', '\:')
src/allmydata/web/status.py:1569: SyntaxWarning: invalid escape sequence '\d'
  u"_(\d\d)_(\d)_percentile",
src/allmydata/web/status.py:1570: SyntaxWarning: invalid escape sequence '\g'
  u'{quantile="0.\g<1>\g<2>"}',
src/allmydata/node.py:93: SyntaxWarning: invalid escape sequence '\.'
  ADDR_RE = re.compile("^([1-9][0-9]*\.[1-9][0-9]*\.[1-9][0-9]*\.[1-9][0-9]*)(:([1-9][0-9]*))?$")

Change History (0)

Note: See TracTickets for help on using tickets.