You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by lm...@apache.org on 2018/07/29 16:53:02 UTC
svn commit: r1836990 - in /chemistry/cmislib/branches/py3_compat/src/tests:
test_acl.py test_changeentry.py test_document.py test_folder.py
test_query.py test_repository.py
Author: lmignon
Date: Sun Jul 29 16:53:02 2018
New Revision: 1836990
URL: http://svn.apache.org/viewvc?rev=1836990&view=rev
Log:
py3compat: 'print xyx' -> 'print(xyx)'
Modified:
chemistry/cmislib/branches/py3_compat/src/tests/test_acl.py
chemistry/cmislib/branches/py3_compat/src/tests/test_changeentry.py
chemistry/cmislib/branches/py3_compat/src/tests/test_document.py
chemistry/cmislib/branches/py3_compat/src/tests/test_folder.py
chemistry/cmislib/branches/py3_compat/src/tests/test_query.py
chemistry/cmislib/branches/py3_compat/src/tests/test_repository.py
Modified: chemistry/cmislib/branches/py3_compat/src/tests/test_acl.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/branches/py3_compat/src/tests/test_acl.py?rev=1836990&r1=1836989&r2=1836990&view=diff
==============================================================================
--- chemistry/cmislib/branches/py3_compat/src/tests/test_acl.py (original)
+++ chemistry/cmislib/branches/py3_compat/src/tests/test_acl.py Sun Jul 29 16:53:02 2018
@@ -32,14 +32,14 @@ class TestACL:
def testSupportedPermissions(self):
"""Test the value of supported permissions enum"""
if not self._repo.getCapabilities()['ACL']:
- print messages.NO_ACL_SUPPORT
+ print(messages.NO_ACL_SUPPORT)
return
assert self._repo.getSupportedPermissions() in ['basic', 'repository', 'both']
def testPermissionDefinitions(self):
"""Test the list of permission definitions"""
if not self._repo.getCapabilities()['ACL']:
- print messages.NO_ACL_SUPPORT
+ print(messages.NO_ACL_SUPPORT)
return
supportedPerms = self._repo.getPermissionDefinitions()
assert 'cmis:write' in supportedPerms
@@ -47,7 +47,7 @@ class TestACL:
def testPermissionMap(self):
"""Test the permission mapping"""
if not self._repo.getCapabilities()['ACL']:
- print messages.NO_ACL_SUPPORT
+ print(messages.NO_ACL_SUPPORT)
return
permMap = self._repo.getPermissionMap()
assert 'canGetProperties.Object' in permMap
@@ -56,14 +56,14 @@ class TestACL:
def testPropagation(self):
"""Test the propagation setting"""
if not self._repo.getCapabilities()['ACL']:
- print messages.NO_ACL_SUPPORT
+ print(messages.NO_ACL_SUPPORT)
return
assert self._repo.getPropagation() in ['objectonly', 'propagate', 'repositorydetermined']
def testGetObjectACL(self):
"""Test getting an object's ACL"""
if not self._repo.getCapabilities()['ACL']:
- print messages.NO_ACL_SUPPORT
+ print(messages.NO_ACL_SUPPORT)
return
acl = self._testFolder.getACL()
for entry in acl.getEntries().values():
@@ -73,13 +73,13 @@ class TestACL:
def testApplyACL(self):
"""Test updating an object's ACL"""
if not self._repo.getCapabilities()['ACL']:
- print messages.NO_ACL_SUPPORT
+ print(messages.NO_ACL_SUPPORT)
return
if not self._repo.getCapabilities()['ACL'] == 'manage':
- print 'Repository does not support manage ACL'
+ print('Repository does not support manage ACL')
return
if not self._repo.getSupportedPermissions() in ['both', 'basic']:
- print 'Repository needs to support either both or basic permissions for this test'
+ print('Repository needs to support either both or basic permissions for this test')
return
acl = self._testFolder.getACL()
acl.removeEntry(self.acl_principal_id)
Modified: chemistry/cmislib/branches/py3_compat/src/tests/test_changeentry.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/branches/py3_compat/src/tests/test_changeentry.py?rev=1836990&r1=1836989&r2=1836990&view=diff
==============================================================================
--- chemistry/cmislib/branches/py3_compat/src/tests/test_changeentry.py (original)
+++ chemistry/cmislib/branches/py3_compat/src/tests/test_changeentry.py Sun Jul 29 16:53:02 2018
@@ -35,7 +35,7 @@ class TestChangeEntry:
# need to check changes capability
changeCap = self._repo.capabilities['Changes']
if changeCap == None or changeCap == 'none':
- print messages.NO_CHANGE_LOG_SUPPORT
+ print(messages.NO_CHANGE_LOG_SUPPORT)
return
# at least one change should have been made due to the creation of the
@@ -54,16 +54,16 @@ class TestChangeEntry:
# need to check changes capability
changeCap = self._repo.capabilities['Changes']
if changeCap == None or changeCap == 'none':
- print messages.NO_CHANGE_LOG_SUPPORT
+ print(messages.NO_CHANGE_LOG_SUPPORT)
return
if changeCap == 'objectidsonly':
- print messages.NO_CHANGE_OBJECT_SUPPORT
+ print(messages.NO_CHANGE_OBJECT_SUPPORT)
return
# need to check ACL capability
if not self._repo.capabilities['ACL']:
- print messages.NO_ACL_SUPPORT
+ print(messages.NO_ACL_SUPPORT)
return
# need to test once with includeACL set to true
@@ -93,11 +93,11 @@ class TestChangeEntry:
# need to check changes capability
changeCap = self._repo.capabilities['Changes']
if changeCap == None or changeCap == 'none':
- print messages.NO_CHANGE_LOG_SUPPORT
+ print(messages.NO_CHANGE_LOG_SUPPORT)
return
if changeCap == 'objectidsonly':
- print messages.NO_CHANGE_OBJECT_SUPPORT
+ print(messages.NO_CHANGE_OBJECT_SUPPORT)
return
# need to test once without includeProperties set. the objectID should be there
Modified: chemistry/cmislib/branches/py3_compat/src/tests/test_document.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/branches/py3_compat/src/tests/test_document.py?rev=1836990&r1=1836989&r2=1836990&view=diff
==============================================================================
--- chemistry/cmislib/branches/py3_compat/src/tests/test_document.py (original)
+++ chemistry/cmislib/branches/py3_compat/src/tests/test_document.py Sun Jul 29 16:53:02 2018
@@ -344,7 +344,7 @@ class TestDocument:
def testSetContentStreamPWCMimeType(self):
"""Check the mimetype after the PWC checkin"""
if self._repo.getCapabilities()['ContentStreamUpdatability'] == 'none':
- print 'This repository does not allow content stream updates, skipping'
+ print('This repository does not allow content stream updates, skipping')
return
testFile1 = self.binary_file_1
@@ -434,7 +434,7 @@ class TestDocument:
newDoc = self._testFolder.createDocument(
fileName, contentFile=f, properties=props)
if not 'canCheckOut' in newDoc.allowableActions.keys():
- print 'The test doc cannot be checked out...skipping'
+ print('The test doc cannot be checked out...skipping')
return
pwc = newDoc.checkout()
pwc.deleteContentStream()
Modified: chemistry/cmislib/branches/py3_compat/src/tests/test_folder.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/branches/py3_compat/src/tests/test_folder.py?rev=1836990&r1=1836989&r2=1836990&view=diff
==============================================================================
--- chemistry/cmislib/branches/py3_compat/src/tests/test_folder.py (original)
+++ chemistry/cmislib/branches/py3_compat/src/tests/test_folder.py Sun Jul 29 16:53:02 2018
@@ -231,7 +231,7 @@ class TestFolder:
def testAddObject(self):
"""Add an existing object to another folder"""
if not self._repo.getCapabilities()['Multifiling']:
- print 'This repository does not allow multifiling, skipping'
+ print('This repository does not allow multifiling, skipping')
return
subFolder1 = self._testFolder.createFolder('sub1')
@@ -246,7 +246,7 @@ class TestFolder:
def testRemoveObject(self):
"""Remove an existing object from a secondary folder"""
if not self._repo.getCapabilities()['Unfiling']:
- print 'This repository does not allow unfiling, skipping'
+ print('This repository does not allow unfiling, skipping')
return
subFolder1 = self._testFolder.createFolder('sub1')
Modified: chemistry/cmislib/branches/py3_compat/src/tests/test_query.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/branches/py3_compat/src/tests/test_query.py?rev=1836990&r1=1836989&r2=1836990&view=diff
==============================================================================
--- chemistry/cmislib/branches/py3_compat/src/tests/test_query.py (original)
+++ chemistry/cmislib/branches/py3_compat/src/tests/test_query.py Sun Jul 29 16:53:02 2018
@@ -103,6 +103,6 @@ class TestQuery:
found = isInResultSet(resultSet, self._testContent2)
if not found:
maxTries -= 1
- print 'Not found...sleeping for 10 secs. Remaining tries:%d' % maxTries
+ prin('Not found...sleeping for 10 secs. Remaining tries:%d' % maxTries)
sleep(10)
assert found
Modified: chemistry/cmislib/branches/py3_compat/src/tests/test_repository.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/branches/py3_compat/src/tests/test_repository.py?rev=1836990&r1=1836989&r2=1836990&view=diff
==============================================================================
--- chemistry/cmislib/branches/py3_compat/src/tests/test_repository.py (original)
+++ chemistry/cmislib/branches/py3_compat/src/tests/test_repository.py Sun Jul 29 16:53:02 2018
@@ -114,18 +114,18 @@ class TestRepository:
fileName, contentFile=f, properties=props)
doc10Id = doc10.getObjectId()
if not 'canCheckOut' in doc10.allowableActions.keys():
- print 'The test doc cannot be checked out...skipping'
+ print('The test doc cannot be checked out...skipping')
return
pwc = doc10.checkout()
doc11 = pwc.checkin(major='false') # checkin a minor version, 1.1
if not 'canCheckOut' in doc11.allowableActions.keys():
- print 'The test doc cannot be checked out...skipping'
+ print('The test doc cannot be checked out...skipping')
return
pwc = doc11.checkout()
doc20 = pwc.checkin() # checkin a major version, 2.0
doc20Id = doc20.getObjectId()
if not 'canCheckOut' in doc20.allowableActions.keys():
- print 'The test doc cannot be checked out...skipping'
+ print('The test doc cannot be checked out...skipping')
return
pwc = doc20.checkout()
doc21 = pwc.checkin(major='false') # checkin a minor version, 2.1
@@ -183,7 +183,7 @@ class TestRepository:
# def testCreateUnfiledDocument(self):
# '''Create a new unfiled document'''
# if self._repo.getCapabilities()['Unfiling'] != True:
- # print 'Repo does not support unfiling, skipping'
+ # print ('Repo does not support unfiling, skipping')
# return
# documentName = 'testDocument'
# newDoc = self._repo.createDocument(documentName)