Skip to content

Commit

Permalink
Issue #779 Fix deprecation warnings (#850)
Browse files Browse the repository at this point in the history
Summary:
Resolves #779 - Updates strings in several test files to properly escape backslashes.

Pull Request resolved: #850

Reviewed By: chadaustin

Differential Revision: D23249109

Pulled By: wez

fbshipit-source-id: 4c1a9fe13e7de6f2c19eef9bac17ee6847568bbf
  • Loading branch information
thebecwar authored and facebook-github-bot committed Sep 3, 2020
1 parent fe0fdf2 commit f2b37e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/integration/test_clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ def test_clock(self):
self.watchmanCommand("watch", root)
clock = self.watchmanCommand("clock", root)

self.assertRegex(clock["clock"], "^c:\d+:\d+:\d+:\d+$")
self.assertRegex(clock["clock"], "^c:\\d+:\\d+:\\d+:\\d+$")

def test_clock_sync(self):
root = self.mkdtemp()
self.watchmanCommand("watch", root)
clock1 = self.watchmanCommand("clock", root, {"sync_timeout": 100})
self.assertRegex(clock1["clock"], "^c:\d+:\d+:\d+:\d+$")
self.assertRegex(clock1["clock"], "^c:\\d+:\\d+:\\d+:\\d+$")

clock2 = self.watchmanCommand("clock", root, {"sync_timeout": 100})
self.assertRegex(clock2["clock"], "^c:\d+:\d+:\d+:\d+$")
self.assertRegex(clock2["clock"], "^c:\\d+:\\d+:\\d+:\\d+$")

self.assertNotEqual(clock1, clock2)
2 changes: 1 addition & 1 deletion tests/integration/test_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ def test_fields(self):
self.assertEqual(ns // 1000, us)

for field in ["cclock", "oclock"]:
self.assertRegex(file[field], "^c:\d+:\d+:\d+:\d+$")
self.assertRegex(file[field], "^c:\\d+:\\d+:\\d+:\\d+$")
2 changes: 1 addition & 1 deletion tests/integration/test_request_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_queryRequestId(self):
request_id = "f13bd3bc02c27afe2413932c6fa6c4942b0574b3"
params = {"since": "c:0:0", "request_id": request_id}
self.watchmanCommand("query", root, params)
pat = re.compile(".* \[client=.*\] request_id = %s" % request_id)
pat = re.compile(".* \\[client=.*\\] request_id = %s" % request_id)

self.assertWaitFor(
lambda: any(pat.match(l) for l in self.getServerLogContents()),
Expand Down

0 comments on commit f2b37e8

Please sign in to comment.