[prev in list] [next in list] [prev in thread] [next in thread]
List: gump-commits
Subject: svn commit: r1883940 - in /gump/branches/python3/python/gump: core/model/property.py test/model.py t
From: ajack () apache ! org
Date: 2020-11-29 22:00:39
Message-ID: 20201129220039.A33DA17A67F () svn01-us-east ! apache ! org
[Download RAW message or body]
Author: ajack
Date: Sun Nov 29 22:00:39 2020
New Revision: 1883940
URL: http://svn.apache.org/viewvc?rev=1883940&view=rev
Log:
Patching an argument value [is not None] to [is None] ... something lost in \
translation; python2 to python3
Modified:
gump/branches/python3/python/gump/core/model/property.py
gump/branches/python3/python/gump/test/model.py
gump/branches/python3/python/gump/test/resources/full1/module1.xml
Modified: gump/branches/python3/python/gump/core/model/property.py
URL: http://svn.apache.org/viewvc/gump/branches/python3/python/gump/core/model/property.py?rev=1883940&r1=1883939&r2=1883940&view=diff
==============================================================================
--- gump/branches/python3/python/gump/core/model/property.py (original)
+++ gump/branches/python3/python/gump/core/model/property.py Sun Nov 29 22:00:39 2020
@@ -144,6 +144,7 @@ class Property(NamedModelObject):
responsibleParty.addError('No project specified.')
elif self.hasDomAttribute('path'):
+
# If a property on a project..
if not parent == workspace:
relativeProject = None
@@ -166,9 +167,11 @@ class Property(NamedModelObject):
# Path relative to module's srcdir (doesn't work
# in workspace)
path = self.getDomAttributeValue('path')
- self.value = os.path.abspath(os.path.join( \
+ joinedPath = os.path.join( \
relativeProject.getModule().getWorkingDirectory(),
- path))
+ path)
+ absPath = os.path.abspath(joinedPath)
+ self.value = absPath
else:
responsibleParty.addError( \
'Can\'t have path on property on workspace: ' \
@@ -180,7 +183,7 @@ class Property(NamedModelObject):
#
# Do we have a value yet?
#
- if not blankOk and self.value is not None:
+ if not blankOk and self.value is None:
responsibleParty.addError('Unhandled Property: ' \
+ self.getName() + ' on: ' \
+ str(parent))
Modified: gump/branches/python3/python/gump/test/model.py
URL: http://svn.apache.org/viewvc/gump/branches/python3/python/gump/test/model.py?rev=1883940&r1=1883939&r2=1883940&view=diff
==============================================================================
--- gump/branches/python3/python/gump/test/model.py (original)
+++ gump/branches/python3/python/gump/test/model.py Sun Nov 29 22:00:39 2020
@@ -143,6 +143,19 @@ class ModelTestSuite(UnitTestSuite):
self.assertFalse('Repository has Password',repo2.hasPassword())
self.assertNone('Repository Password',repo2.getPassword())
+ def testConfigure(self):
+ self.assertNotNone('Got project1', self.project1)
+ self.assertTrue('Got project1 configure', self.project1.hasConfigure())
+ configure = self.project1.getConfigure()
+ self.assertTrue('Has properties', configure.hasProperties())
+ properties = configure.getProperties()
+ self.assertNotNone('Has properties', properties)
+ for prop in properties:
+ self.assertNotNone('Has property name', prop.name)
+ self.assertNotEmptySequence('Has property name', prop.name)
+ self.assertNotNone('Has property value', prop.value)
+ self.assertNotEmptySequence('Has property value', prop.value)
+
def testComparisons(self):
project1 = self.project1
project2 = self.project2
Modified: gump/branches/python3/python/gump/test/resources/full1/module1.xml
URL: http://svn.apache.org/viewvc/gump/branches/python3/python/gump/test/resources/full1/module1.xml?rev=1883940&r1=1883939&r2=1883940&view=diff
==============================================================================
--- gump/branches/python3/python/gump/test/resources/full1/module1.xml (original)
+++ gump/branches/python3/python/gump/test/resources/full1/module1.xml Sun Nov 29 \
22:00:39 2020 @@ -12,6 +12,13 @@
to="project1@jakarta.apache.org"/>
<project name="project1">
+
+ <configure>
+ <arg name="--prefix" path="dest-@@DATE@@"/>
+ <arg name="--prefix1" path="dest1"/>
+ <arg name="--prefix2" value="dest1"/>
+ </configure>
+
<package>org.apache.project1</package>
<script name="gumpscript"/>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic