Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Issue 387007: Cleanup the test and fix mocks. Workaround pprint flakiness. (Closed)

Created:
11 years, 1 month ago by M-A Ruel
Modified:
9 years, 7 months ago
Reviewers:
Dirk Pranke
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Cleanup the test and fix mocks. Workaround pprint flakiness. TEST=unit tests BUG=none

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -182 lines) Patch
M tests/gclient_test.py View 23 chunks +201 lines, -182 lines 4 comments Download

Messages

Total messages: 6 (0 generated)
M-A Ruel
11 years, 1 month ago (2009-11-10 18:29:15 UTC) #1
M-A Ruel
Reviewers: dpranke, Description: Cleanup the test and fix mocks. Workaround pprint flakiness. TEST=unit tests BUG=none ...
11 years, 1 month ago (2009-11-10 18:29:34 UTC) #2
Dirk Pranke
lgtm, although I don't know pymox and so I can really only spot syntactic stuff ...
11 years, 1 month ago (2009-11-10 19:53:38 UTC) #3
Dirk Pranke
lgtm, although I don't know pymox and so I can really only spot syntactic stuff ...
11 years, 1 month ago (2009-11-10 19:53:56 UTC) #4
M-A Ruel
http://code.google.com/p/pymox/ It simplifies "calls expectation" type of unit tests. It has integrated mocking/unmocking support which ...
11 years, 1 month ago (2009-11-10 20:07:12 UTC) #5
M-A Ruel
11 years, 1 month ago (2009-11-10 20:07:30 UTC) #6
http://code.google.com/p/pymox/

It simplifies "calls expectation" type of unit tests. It has integrated
mocking/unmocking support which helps a lot.


http://codereview.chromium.org/387007/diff/1/2
File tests/gclient_test.py (right):

http://codereview.chromium.org/387007/diff/1/2#newcode351
Line 351: gclient.os.path.join(self.root_dir, options.config_filename),
On 2009/11/10 19:53:38, dpranke wrote:
> at some point I need to learn how pxmox works ... is this really
gclient.os ?

Actually, this is so we don't have multiple entry point for os. So the
unit test doesn't import os but use the import from gclient.py instead.
Hence gclient.os.path...

This is unrelated to pymox. :)

http://codereview.chromium.org/387007/diff/1/2#newcode695
Line 695: # pprint.pformat() is non-deterministic in this case!!
On 2009/11/10 19:53:38, dpranke wrote:
> odd. is that a python bug?

Yes.

http://codereview.chromium.org/387007

Powered by Google App Engine
This is Rietveld 408576698