bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] GSoC 2013 project on rewriting Test Suite in Python.


From: Darshit Shah
Subject: Re: [Bug-wget] GSoC 2013 project on rewriting Test Suite in Python.
Date: Sun, 30 Jun 2013 02:29:08 +0530

> An option would be to support XML (e.g. Test-xyz.xml) and a simple
> key/value
> text file (e.g. Test-xyz.txt). Both, XML and TXT have their pros and cons.
> So I
> won't say, one is better than the other... but it gives contributors a
> choice.
>
> Not a bad idea. Though I would be wary of having two different formats in
which tests are written. Fragmentation isn't always a good choice.
I would prefer to stick to one option. If there are others who too would
prefer a TXT config file, I will switch to that.

>
> You will just have two input file parsers, but the core of the test suite
> will
> stay the same as with XML only.
>
> Yes, that shouldn't be too tough. Will require a small amount of code
cleanup, but that's easy. The reason I initially went with XML files was
that Python provides us with a very good inbuilt XML Parser whereas the
Text Config parser wasn't so good. I'd have to write the Text config parser
on my own.

>
> A few other ideas:
> Maybe you can rename 'Special' to 'Server' or 'ServerRules' or something.
> I find 'Special' is too generic and unintuitive.
>
Yes, I agree. Special isn't really that intuitive a name. It started with
only one or two options, but then I decided to add everything to it. I have
renamed it to ServerRules in my devel branch.

>
> You could simplify the server / special rules.
> 'Content Disposition' can be substituted by 'Header'.
> When having a 'Code' element, you maybe won't need a 'Redirect' element
> ('Code' and 'header' can substitute 'Redirect' !?)
>
That's a great idea and will allow for even more code reuse. However that
is only on the internal working.
While writing Tests I thought being explicit was a better option. It's just
an alias on the front for convenience, you may use either of 'Content
Disposition' or 'Header' elements and you will get the exact same results.
I'll document this.
I am also planning on reusing some more code with the 'Redirect' statement
like you suggest. It seems like a very good idea.

I'll fix some of these things, add a little more documentation and push a
new release commit in the next few days.

-- 
Thanking You,
Darshit Shah


reply via email to

[Prev in Thread] Current Thread [Next in Thread]