test naming

John A Meinel john at arbash-meinel.com
Wed Nov 23 15:49:06 GMT 2005


Martin Pool wrote:
> Hi,
> 
> I see John's integration branch renames many of the test cases 
> 
> revno: 1337
> committer: John Arbash Meinel <john at arbash-meinel.com>
> branch nick: bzr-jam-integration
> timestamp: Fri 2005-11-18 10:16:38 -0600
> message:
>   Renamed all test modules to remove the 'test' prefix
> renamed:
>   bzrlib/selftest/test_ancestry.py => bzrlib/selftest/ancestry.py
>   bzrlib/selftest/test_bad_files.py => bzrlib/selftest/bad_files.py
>   bzrlib/selftest/test_command.py => bzrlib/selftest/command.py
>   bzrlib/selftest/test_commit.py => bzrlib/selftest/commit.py
>   bzrlib/selftest/test_commit_merge.py => bzrlib/selftest/commit_merge.py
>   bzrlib/selftest/test_conflicts.py => bzrlib/selftest/conflicts.py
>   bzrlib/selftest/test_merge_core.py => bzrlib/selftest/merge_core.py
>   bzrlib/selftest/test_parent.py => bzrlib/selftest/parent.py
>   bzrlib/selftest/test_revision_info.py => bzrlib/selftest/revision_info.py
>   bzrlib/selftest/test_smart_add.py => bzrlib/selftest/smart_add.py
>   ...
> 
> I think making them consistent is good but I'd prefer to keep the 'test'
> prefix, so it's easier for people to find them in editor buffers, etc.
> Other people quickly polled on irc agree, so I'll merge this and rename
> them all to be consistent.  
> 
> Robert suggests that using bzrlib.tests.testfoo is consistent with other
> Python packages so I might do that too.
> 

I went ahead and did this, since you are sleeping now. In my integration
branch, all of the tests are now named:
bzrlib/tests/test_foo.py

I went with the underscore, because I thought not having it looked bad,
especially for something like: testcommit_merge.py

Everything has been consistently named now. And all 493 tests run and pass.

I changed the name to "tests" because selftest was a remnant left over
because of the command name. While 'tests' fits better (and is shorter).

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051123/54f2b7f2/attachment.pgp 


More information about the bazaar mailing list