You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by Justin <jr...@ucdavis.edu> on 2005/07/01 20:16:42 UTC

Gump3 Unit Test - error

My environment is

WinXP Running:
Cygwin
java1.4
python2.4
MySQL4.1

I am getting errors from running unit test, that I am having trouble tracing.

======================================================================
ERROR: test_visit_module (testDynagumper.DynagumperTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python24\Lib\site-packages\pmock.py", line 507, in _auto_verified_test
    self._real_test_method()
  File "C:\cygwin\home\BigMerz\gump3\pygump\python\gump\test\testDynagumper.py", line 55, in test_visit_module
    dynagumper.visit_module("blah")
  File "C:\cygwin\home\BigMerz\gump3\pygump\python\gump\plugins\dynagumper.py", line 107, in visit_module
    cmd = "SELECT * FROM %s WHERE name = '%s';" % (tablename, module.name)
AttributeError: 'str' object has no attribute 'name'

======================================================================
ERROR: test_visit_workspace (testDynagumper.DynagumperTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python24\Lib\site-packages\pmock.py", line 50
Find some starting with <DOM Element: in at 0xc7fbc0> 
Find module starting with <DOM Element: uniquetaghere at 0xcb6468> 
Find project starting with <DOM Element: uniquetaghere at 0xcbba58> 
Find repository starting with <DOM Element: uniquetaghere at 0xcc8080> 
7, in _auto_verified_test
    self._real_test_method()
  File "C:\cygwin\home\BigMerz\gump3\pygump\python\gump\test\testDynagumper.py", line 50, in test_visit_workspace
    dynagumper.visit_workspace("blah")
  File "C:\cygwin\home\BigMerz\gump3\pygump\python\gump\plugins\dynagumper.py", line 80, in visit_workspace
    cmd = "SELECT * FROM %s WHERE name = '%s' AND host = '%s';" % (tablename, workspace.name, self.host)
AttributeError: 'str' object has no attribute 'name'

======================================================================
ERROR: test_do_script (testPluginBuilder.BuilderTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python24\Lib\site-packages\pmock.py", line 507, in _auto_verified_test
    self._real_test_method()
  File "C:\cygwin\home\BigMerz\gump3\pygump\python\gump\test\testPluginBuilder.py", line 77, in test_do_script
    rmtree(basedir)
  File "c:\python24\lib\shutil.py", line 159, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "c:\python24\lib\shutil.py", line 159, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "c:\python24\lib\shutil.py", line 159, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "c:\python24\lib\shutil.py", line 164, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "c:\python24\lib\shutil.py", line 162, in rmtree
    os.remove(fullname)
OSError: [Errno 13] Permission denied: 'c:\\docume~1\\bigmer~1\\locals~1\\temp\\tmpyuuuwl\\w\\r\\m\\dobuild.bat'

======================================================================
FAIL: test_visit_project (testDynagumper.DynagumperTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python24\Lib\site-packages\pmock.py", line 507, in _auto_verified_test
    self._real_test_method()
  File "C:\cygwin\home\BigMerz\gump3\pygump\python\gump\test\testDynagumper.py", line 64, in test_visit_project
    dynagumper.visit_project(self.project)
  File "C:\cygwin\home\BigMerz\gump3\pygump\python\gump\plugins\dynagumper.py", line 131, in visit_project
    (rows, result) = self.db.execute(cmd)
  File "c:\python24\Lib\site-packages\pmock.py", line 392, in __call__
    return self._mock.invoke(Invocation(self._name, args, kwargs))
  File "c:\python24\Lib\site-packages\pmock.py", line 454, in invoke
    raise MatchError.create_error(str(err), invocation, self)
MatchError: no match found
invoked execute("SELECT * FROM projects WHERE name = 'blah';")

----------------------------------------------------------------------
Ran 54 tests in 2.424s

-Thanks

Justin


Re: Gump3 Unit Test - error

Posted by Leo Simons <ma...@leosimons.com>.
Justin wrote:
> My environment is
> 
> WinXP Running:
> Cygwin
> java1.4
> python2.4
> MySQL4.1
> 
> I am getting errors from running unit test, that I am having trouble tracing.

Thanks Justin. I think these are errors in the tests, so your
environment is probably just fine.

> ERROR: test_visit_module (testDynagumper.DynagumperTestCase)
> ERROR: test_visit_workspace (testDynagumper.DynagumperTestCase)
> FAIL: test_visit_project (testDynagumper.DynagumperTestCase)

I have local fixes for these already. Once I resurrect my laptop they'll
be fixed.

What happens here is that I "stubbed out" dumb arguments in the test
cases, and then when someone added an implementation to the actual
component, those arguments didn't make sense to the component hence it
started producing failures.

> ERROR: test_do_script (testPluginBuilder.BuilderTestCase)
> OSError: [Errno 13] Permission denied: 'c:\\docume~1\\bigmer~1\\locals~1\\temp\\tmpyuuuwl\\w\\r\\m\\dobuild.bat'

That's probably because we didn't close the file properly. I hope I just
committed the fix :-)

cheers,

Leo

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org