Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Iliya Manolov
erp5
Commits
4401cb4f
Commit
4401cb4f
authored
Jun 22, 2015
by
Tatuya Kamada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow python 2.7.
parent
ff8dcb0a
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
23 deletions
+23
-23
product/ERP5Type/tests/ERP5TypeLiveTestCase.py
product/ERP5Type/tests/ERP5TypeLiveTestCase.py
+1
-2
product/ERP5Type/tests/ProcessingNodeTestCase.py
product/ERP5Type/tests/ProcessingNodeTestCase.py
+2
-2
product/ERP5Type/tests/runFunctionalTest.py
product/ERP5Type/tests/runFunctionalTest.py
+1
-1
product/ERP5Type/tests/runTestSuite.py
product/ERP5Type/tests/runTestSuite.py
+11
-4
product/ERP5Type/tests/runUnitTest.py
product/ERP5Type/tests/runUnitTest.py
+3
-6
product/ERP5Type/tests/testDynamicClassGeneration.py
product/ERP5Type/tests/testDynamicClassGeneration.py
+1
-1
product/ERP5Type/tests/testERP5Type.py
product/ERP5Type/tests/testERP5Type.py
+1
-1
product/ERP5Type/tests/testERP5TypeInterfaces.py
product/ERP5Type/tests/testERP5TypeInterfaces.py
+1
-2
product/ERP5Type/tests/utils.py
product/ERP5Type/tests/utils.py
+2
-4
No files found.
product/ERP5Type/tests/ERP5TypeLiveTestCase.py
View file @
4401cb4f
...
...
@@ -169,7 +169,6 @@ class ERP5TypeTestReLoader(ERP5TypeTestLoader):
def
runLiveTest
(
test_list
,
verbosity
=
1
,
stream
=
None
,
**
kw
):
from
Products.ERP5Type.tests.runUnitTest
import
DebugTestResult
from
Products.ERP5Type.tests
import
backportUnittest
from
StringIO
import
StringIO
# Add path of the TestTemplateItem folder of the instance
path
=
kw
.
get
(
'path'
,
None
)
...
...
@@ -184,7 +183,7 @@ def runLiveTest(test_list, verbosity=1, stream=None, **kw):
sys
.
path
.
extend
(
path
for
path
in
product_test_list
if
path
not
in
current_syspath
)
TestRunner
=
backportU
nittest
.
TextTestRunner
TestRunner
=
u
nittest
.
TextTestRunner
if
ERP5TypeLiveTestCase
not
in
ERP5TypeTestCase
.
__bases__
:
ERP5TypeTestCase
.
__bases__
=
ERP5TypeLiveTestCase
,
if
kw
.
get
(
'debug'
,
False
):
...
...
product/ERP5Type/tests/ProcessingNodeTestCase.py
View file @
4401cb4f
...
...
@@ -8,7 +8,7 @@ from Testing import ZopeTestCase
from
ZODB.POSException
import
ConflictError
from
zLOG
import
LOG
,
ERROR
from
Products.CMFActivity.Activity.Queue
import
VALIDATION_ERROR_DELAY
from
Products.ERP5Type.tests
import
backportUnittest
from
Products.ERP5Type.tests
.utils
import
addUserToDeveloperRole
from
Products.ERP5Type.tests.utils
import
createZServer
...
...
@@ -116,7 +116,7 @@ from OFS.Application import Application
Application
.
_p_resolveConflict
=
Application_resolveConflict
class
ProcessingNodeTestCase
(
backportUnittest
.
TestCase
,
ZopeTestCase
.
TestCase
):
class
ProcessingNodeTestCase
(
ZopeTestCase
.
TestCase
):
"""Minimal ERP5 TestCase class to process activities
When a processing node starts, the portal may not exist yet, or its name is
...
...
product/ERP5Type/tests/runFunctionalTest.py
View file @
4401cb4f
#!/usr/bin/env python2.
6
#!/usr/bin/env python2.
7
import
os
import
re
import
signal
...
...
product/ERP5Type/tests/runTestSuite.py
View file @
4401cb4f
#!/usr/bin/env python2.6
import
argparse
,
pprint
,
socket
,
sys
,
time
,
xmlrpclib
from
DummyTaskDistributionTool
import
DummyTaskDistributionTool
from
ERP5TypeTestSuite
import
ERP5TypeTestSuite
#!/usr/bin/env python2.7
import
argparse
,
sys
from
erp5.util
import
taskdistribution
# XXX: This import is required, just to populate sys.modules['test_suite'].
# Even if it's not used in this file. Yuck.
import
ERP5TypeTestSuite
def
_parsingErrorHandler
(
data
,
_
):
print
>>
sys
.
stderr
,
'Error parsing data:'
,
repr
(
data
)
taskdistribution
.
patchRPCParser
(
_parsingErrorHandler
)
def
makeSuite
(
node_quantity
=
None
,
test_suite
=
None
,
revision
=
None
,
db_list
=
None
,
**
kwargs
):
...
...
product/ERP5Type/tests/runUnitTest.py
View file @
4401cb4f
#!/usr/bin/env python2.
6
#!/usr/bin/env python2.
7
import
os
import
sys
import
pdb
...
...
@@ -12,8 +12,6 @@ import errno
import
random
from
glob
import
glob
import
backportUnittest
WIN
=
os
.
name
==
'nt'
__doc__
=
"""%(program)s: unit test runner for the ERP5 Project
...
...
@@ -317,8 +315,7 @@ class ERP5TypeTestLoader(unittest.TestLoader):
return
filtered_name_list
return
name_list
# BBB: Python < 2.7
getattr
(
unittest
,
'loader'
,
unittest
).
TestLoader
=
ERP5TypeTestLoader
unittest
.
loader
.
TestLoader
=
ERP5TypeTestLoader
class
DebugTestResult
:
"""Wrap an unittest.TestResult, invoking pdb on errors / failures
...
...
@@ -466,7 +463,7 @@ def runUnitTestList(test_list, verbosity=1, debug=0, run_only=None):
root_db_name
,
=
cfg
.
dbtab
.
databases
.
keys
()
DbFactory
(
root_db_name
).
addMountPoint
(
'/'
)
TestRunner
=
backportU
nittest
.
TextTestRunner
TestRunner
=
u
nittest
.
TextTestRunner
import
Lifetime
from
Zope2.custom_zodb
import
Storage
,
save_mysql
,
\
...
...
product/ERP5Type/tests/testDynamicClassGeneration.py
View file @
4401cb4f
...
...
@@ -33,9 +33,9 @@ import unittest
import
transaction
from
persistent
import
Persistent
from
unittest
import
expectedFailure
,
skip
from
Products.ERP5Type.dynamic.portal_type_class
import
synchronizeDynamicModules
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.backportUnittest
import
expectedFailure
,
skip
from
Products.ERP5Type.Core.PropertySheet
import
PropertySheet
as
PropertySheetDocument
from
zope.interface
import
Interface
,
implementedBy
...
...
product/ERP5Type/tests/testERP5Type.py
View file @
4401cb4f
...
...
@@ -32,6 +32,7 @@ import sys
import
transaction
from
random
import
randint
from
unittest
import
expectedFailure
from
Acquisition
import
aq_base
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.utils
import
DummyLocalizer
...
...
@@ -48,7 +49,6 @@ from AccessControl.ZopeGuards import guarded_getattr, guarded_hasattr
from
Products.ERP5Type.tests.utils
import
createZODBPythonScript
from
Products.ERP5Type.tests.utils
import
removeZODBPythonScript
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.tests.backportUnittest
import
expectedFailure
class
PropertySheetTestCase
(
ERP5TypeTestCase
):
"""Base test case class for property sheets tests.
...
...
product/ERP5Type/tests/testERP5TypeInterfaces.py
View file @
4401cb4f
...
...
@@ -28,7 +28,6 @@
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
zope.interface.verify
import
verifyClass
from
Products.ERP5Type.tests.backportUnittest
import
expectedFailure
import
unittest
implements_tuple_list
=
[
...
...
@@ -96,7 +95,7 @@ for failing_method in [
'test_Products.ERP5Type.ConsistencyMessage_ConsistencyMessage_implements_IConsistencyMessage'
,
]:
setattr
(
TestERP5TypeInterfaces
,
failing_method
,
expectedFailure
(
getattr
(
TestERP5TypeInterfaces
,
failing_method
)))
unittest
.
expectedFailure
(
getattr
(
TestERP5TypeInterfaces
,
failing_method
)))
def
test_suite
():
...
...
product/ERP5Type/tests/utils.py
View file @
4401cb4f
...
...
@@ -35,6 +35,7 @@ import random
import
socket
import
sys
import
transaction
import
unittest
import
ZODB
import
zLOG
from
App.config
import
getConfiguration
...
...
@@ -43,7 +44,6 @@ from Zope2.Startup.datatypes import ZopeDatabase
import
Products.ERP5Type
from
Products.MailHost.MailHost
import
MailHost
from
email
import
message_from_string
import
backportUnittest
from
Products.ERP5Type.Globals
import
PersistentMapping
from
Products.ERP5Type.Utils
import
simple_decorator
from
Products.ZSQLCatalog.SQLCatalog
import
Catalog
...
...
@@ -387,9 +387,7 @@ def reindex(func):
# The test will be skipped:
# - the fixture itself is not run
# - if a TODO test is in fact successful, no one will ever know
#
# Test cases using this decorator must extend backportUnittest.TestCase
todo_erp5
=
backportUnittest
.
skip
(
"TODO ERP5"
)
todo_erp5
=
unittest
.
skip
(
"TODO ERP5"
)
class
LogInterceptor
:
'''Replacement for Products.CMFCore.tests.base.testcase.LogInterceptor
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment