gzz-dev
[Top][All Lists]
Advanced

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

Re: [Gzz] tests' filenames


From: Benja Fallenstein
Subject: Re: [Gzz] tests' filenames
Date: Sat, 07 Sep 2002 09:27:22 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020615 Debian/1.0.0-3

Vesa Kaihlavirta wrote:

I see our new tests can now be found with
# find test/gzz -name *.test

...but the tests are all python-scripts.


Jein (yes and no): Syntactically, they're Python scripts. However, there's a lot of special magic going on when they're loaded-- you can NOT expect to be able to either run them from the command line or import them as a module in Jython.

(For example, it is entirely valid for a .test to assume that testutil will set up some kind of context for it, e.g. import some modules.)

I propose that we name future tests (CVS hates renames, as we all know) as *.test.py -- this will help syntax-highlighting editors and, of course, our test developers.


As I said, I don't consider them to be regular Python files. OTOH, you could of course argue that a file containing a dot before the .py is marked as not being a regular Python file, because it couldn't be imported as a module (at least not with the unmodified import command)...

The other reason I prefer .test is that it shows the magic associated with those files better, IMHO-- that just by existing, they become part of the test suite.

All these aren't life-or-death reasons, but reasons for me to prefer .test. But if there's a strong opinion here for .test.py, it's not like I couldn't live with that (tho I think that if you do change this, you should definitely rename the old tests for clarity's sake).

-b.





reply via email to

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