diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2011-12-06 17:18:05 +0100 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2011-12-06 17:18:05 +0100 |
commit | 36bed12a493017432e20d1ce7888f1f82a39cd6b (patch) | |
tree | 2d67967f88d563b984c446cbb359c510923e468b /morphlib/stopwatch_tests.py | |
parent | 7fc337aa46f8732ed4e6dcef8e40d3e350ea705b (diff) | |
download | morph-36bed12a493017432e20d1ce7888f1f82a39cd6b.tar.gz |
Use assertEqual and drop has_keys().
Diffstat (limited to 'morphlib/stopwatch_tests.py')
-rw-r--r-- | morphlib/stopwatch_tests.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/morphlib/stopwatch_tests.py b/morphlib/stopwatch_tests.py index 5a6b1e07..7441eac3 100644 --- a/morphlib/stopwatch_tests.py +++ b/morphlib/stopwatch_tests.py @@ -32,9 +32,9 @@ class StopwatchTests(unittest.TestCase): self.stopwatch.tick('tick', 'a') assert self.stopwatch.times('tick') assert self.stopwatch.time('tick', 'a') - assert self.stopwatch.times('tick').has_key('a') - assert (self.stopwatch.time('tick', 'a') == - self.stopwatch.times('tick')['a']) + assert 'a' in self.stopwatch.times('tick') + self.assertEqual(self.stopwatch.time('tick', 'a'), + self.stopwatch.times('tick')['a']) now = datetime.datetime.now() assert self.stopwatch.time('tick', 'a') < now @@ -55,4 +55,4 @@ class StopwatchTests(unittest.TestCase): watch_delta = self.stopwatch.start_stop_delta('start-stop') assert our_delta.total_seconds() > 0 - assert our_delta == watch_delta + self.assertEqual(our_delta, watch_delta) |