Re: rewrote tests in unittest/ to python unittests
Bram Moolenaar <[email protected]>
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Joerg Beyer wrote:
> here is another test, just put in in the check.py, somewhere
> at the end, over that line: "if __name__ == "__main__":
Very good, I'll add it.
Hmm, I wonder why sufreplace(".cpp", ".o", "source.c") is expected to
raise. It doesn't, but still the test for it appears to work...
Hmm, using valid arguments still works, there must be something wrong
here:
# this calls should raise
for suffrom, sufto, var in [
(".c", ".o", "huhu.c") ]:
self.assertRaises(StandardError, sufreplace, suffrom, sufto, var,
msg = "sufreplace('%s', '%s', '%s') should have raised, but has not" % (suffrom, sufto, var))
It should check for raising UserError anyway...
Looking at the test I remembered that
sufreplace("", ".o", "dir.c/foo.c")
results in "dir.o/foo.o" instead of "dir.c/foo.o". I'll fix that now
and add a test for it.
Keep those tests coming!
--
hundred-and-one symptoms of being an internet addict:
43. You tell the kids they can't use the computer because "Daddy's got work to
do" and you don't even have a job.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01