You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by le...@apache.org on 2004/11/21 21:56:07 UTC
svn commit: r106116 - in gump/trunk: . src/py src/py/gump src/py/gump/engine src/py/gump/model src/py/gump/test src/py/gump/test/engine src/py/gump/test/model
Author: leosimons
Date: Sun Nov 21 12:56:06 2004
New Revision: 106116
Added:
gump/trunk/src/py/
gump/trunk/src/py/gump/
gump/trunk/src/py/gump/__init__.py
gump/trunk/src/py/gump/engine/
gump/trunk/src/py/gump/engine/__init__.py
gump/trunk/src/py/gump/model/
gump/trunk/src/py/gump/model/__init__.py
gump/trunk/src/py/gump/model/workspace.py
gump/trunk/src/py/gump/test/
gump/trunk/src/py/gump/test/__init__.py
gump/trunk/src/py/gump/test/engine/
gump/trunk/src/py/gump/test/engine/__init__.py
gump/trunk/src/py/gump/test/engine/testActor.py
gump/trunk/src/py/gump/test/model/
gump/trunk/src/py/gump/test/model/__init__.py
gump/trunk/src/py/gump/test/model/testWorkspace.py
Modified:
gump/trunk/gump
Log:
Adding in some tryout testcases that use unittest and testrunner.py
Modified: gump/trunk/gump
Url: http://svn.apache.org/viewcvs/gump/trunk/gump?view=diff&rev=106116&p1=gump/trunk/gump&r1=106115&p2=gump/trunk/gump&r2=106116
==============================================================================
--- gump/trunk/gump (original)
+++ gump/trunk/gump Sun Nov 21 12:56:06 2004
@@ -97,6 +97,14 @@
$0 validate
"
;;
+ experimental-tests)
+ echo "
+ Run the experimental new unit tests using testrunner.py.
+
+ Usage:
+ $0 experimental-tests
+"
+ ;;
*)
echo "
Utility commandline interface for Gump.
@@ -194,6 +202,9 @@
help | usage | --help | -help | -H | -h)
usage $@
;;
+ experimental-tests)
+ experimental_tests $@
+ ;;
'')
error "Please specify a command"
;;
@@ -252,7 +263,6 @@
# Use Apache Forrest to build the documentation.
function site
{
- echo "$0: WARNING -- latest Forrest doesn't seem to be working properly..."
check_env "forrest" "http://forrest.apache.org/mirrors.cgi"
forrest
@@ -307,6 +317,21 @@
cd ..
}
+# Run the experimental new unit tests.
+function experimental_tests
+{
+ check_env "python" "http://www.python.org/"
+
+ local dir=$1
+ if [[ -z "$dir" ]]; then
+ dir='src/py'
+ else
+ shift
+ fi
+
+ find $dir -name *.pyc | xargs rm -Rf # get rid of compiled files
+ python bin/testrunner.py -d $dir $@ # run the tests
+}
#############################################################################
# Run the script...
Added: gump/trunk/src/py/gump/__init__.py
Url: http://svn.apache.org/viewcvs/gump/trunk/src/py/gump/__init__.py?view=auto&rev=106116
==============================================================================
--- (empty file)
+++ gump/trunk/src/py/gump/__init__.py Sun Nov 21 12:56:06 2004
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
Added: gump/trunk/src/py/gump/engine/__init__.py
Url: http://svn.apache.org/viewcvs/gump/trunk/src/py/gump/engine/__init__.py?view=auto&rev=106116
==============================================================================
--- (empty file)
+++ gump/trunk/src/py/gump/engine/__init__.py Sun Nov 21 12:56:06 2004
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
Added: gump/trunk/src/py/gump/model/__init__.py
Url: http://svn.apache.org/viewcvs/gump/trunk/src/py/gump/model/__init__.py?view=auto&rev=106116
==============================================================================
--- (empty file)
+++ gump/trunk/src/py/gump/model/__init__.py Sun Nov 21 12:56:06 2004
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
Added: gump/trunk/src/py/gump/model/workspace.py
Url: http://svn.apache.org/viewcvs/gump/trunk/src/py/gump/model/workspace.py?view=auto&rev=106116
==============================================================================
--- (empty file)
+++ gump/trunk/src/py/gump/model/workspace.py Sun Nov 21 12:56:06 2004
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class Workspace:
+ def __init__(self):
+ self.modules={}
Added: gump/trunk/src/py/gump/test/__init__.py
Url: http://svn.apache.org/viewcvs/gump/trunk/src/py/gump/test/__init__.py?view=auto&rev=106116
==============================================================================
--- (empty file)
+++ gump/trunk/src/py/gump/test/__init__.py Sun Nov 21 12:56:06 2004
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
Added: gump/trunk/src/py/gump/test/engine/__init__.py
Url: http://svn.apache.org/viewcvs/gump/trunk/src/py/gump/test/engine/__init__.py?view=auto&rev=106116
==============================================================================
--- (empty file)
+++ gump/trunk/src/py/gump/test/engine/__init__.py Sun Nov 21 12:56:06 2004
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
Added: gump/trunk/src/py/gump/test/engine/testActor.py
Url: http://svn.apache.org/viewcvs/gump/trunk/src/py/gump/test/engine/testActor.py?view=auto&rev=106116
==============================================================================
--- (empty file)
+++ gump/trunk/src/py/gump/test/engine/testActor.py Sun Nov 21 12:56:06 2004
@@ -0,0 +1,34 @@
+#!/usr/bin/env python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+__revision__ = "$Rev$"
+__date__ = "$Date$"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+import unittest
+from unittest import TestCase
+
+class ActorTestCase(TestCase):
+ def testBasics(self):
+ pass
+
+# used by testrunner.py
+def test_suite():
+ return unittest.makeSuite(ActorTestCase,'test')
+
+if __name__ == '__main__':
+ unittest.main()
Added: gump/trunk/src/py/gump/test/model/__init__.py
Url: http://svn.apache.org/viewcvs/gump/trunk/src/py/gump/test/model/__init__.py?view=auto&rev=106116
==============================================================================
--- (empty file)
+++ gump/trunk/src/py/gump/test/model/__init__.py Sun Nov 21 12:56:06 2004
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
Added: gump/trunk/src/py/gump/test/model/testWorkspace.py
Url: http://svn.apache.org/viewcvs/gump/trunk/src/py/gump/test/model/testWorkspace.py?view=auto&rev=106116
==============================================================================
--- (empty file)
+++ gump/trunk/src/py/gump/test/model/testWorkspace.py Sun Nov 21 12:56:06 2004
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import unittest
+from unittest import TestCase
+
+from gump.model.workspace import Workspace
+
+class WorkspaceTestCase(TestCase):
+ def setUp(self):
+ self.workspace = Workspace()
+
+ def testWorkspaceHasEmptyModuleDictionary(self):
+ self.assert_( hasattr( self.workspace, 'modules' ) )
+ self.assertEquals( type({}), type(self.workspace.modules) )
+
+# used by testrunner.py
+def test_suite():
+ return unittest.makeSuite(WorkspaceTestCase,'test')
+
+if __name__ == '__main__':
+ unittest.main()