[Webkit-unassigned] [Bug 31923] [bzt] Unit test download commands

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 27 09:22:56 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=31923





--- Comment #3 from Adam Barth <abarth at webkit.org>  2009-11-27 09:22:55 PST ---
> I don't understand why you're adding "return tool":
>  43         return tool
> Why?

Yeah, this isn't needed until the future.  I'll add it then.

> 232              bugs_to_patches[bug_id] = bugs_to_patches.get(bug_id,
> []).append(patch)
>  234             bugs_to_patches[bug_id] = bugs_to_patches.get(bug_id, []) +
> [patch]
> 
> Does .append() return none? 

Yes.

> Was it not working before?

Right, it was broken if you had multiple patches per bug.

> I'm not sure I understand:
>  36     def _default_options(self):
> either, but it's nice to list them all.

Basically, I want to test the default path through each command, so i have to
use an options object with the default values.

> Why does MockBugzilla inherit from Mock?
>  34 class MockBugzilla(Mock):

So I don't have have implement all the functions that return None.  Mock takes
care of that more me.  Eventually we should assert which functions actually got
used, but that's for the future.

> I would think that we would make:
>  35     patch1 = {
> into an array eventually.  THen the fetch_attachment lookup is super-simple.

Ok.

> Is this gonna be a problem?
>  93         self.checkout_root = os.getcwd()
> Does it ever touch the disk?  Will it end up leaving turd files as a result of
> the test, or fail if you run-webkit-tests from a non-scm directory?

As far as I know, this should be fine.  The issue is that some of the commands
cd to this directory, so we need something real.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list