From 3988a73ade7d5c4d227ccb7af2c85e11746a064c Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Fri, 25 Oct 2013 18:54:43 -0700 Subject: [PATCH] tfw: deal with negative temperatures in test --- modules/test/test_tfw.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/test/test_tfw.py b/modules/test/test_tfw.py index 20d7d74..ebea00b 100644 --- a/modules/test/test_tfw.py +++ b/modules/test/test_tfw.py @@ -27,7 +27,7 @@ class TestTfw(unittest.TestCase): tfw.tfw(self.phenny, input, celsius=True) out = self.phenny.say.call_args[0][0] - m = re.match('^\d+°C‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$', out, + m = re.match('^[\-\d]+°C‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$', out, flags=re.UNICODE) self.assertTrue(m) @@ -36,7 +36,7 @@ class TestTfw(unittest.TestCase): tfw.tfw(self.phenny, input, fahrenheit=True) out = self.phenny.say.call_args[0][0] - m = re.match('^\d+°F‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$', out, + m = re.match('^[\-\d]+°F‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$', out, flags=re.UNICODE) self.assertTrue(m) @@ -45,7 +45,7 @@ class TestTfw(unittest.TestCase): tfw.tfw(self.phenny, input) out = self.phenny.say.call_args[0][0] - m = re.match('^[\d\.]+ meV‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$', out, + m = re.match('^[\-\d\.]+ meV‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$', out, flags=re.UNICODE) self.assertTrue(m)