yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12495
[Branch ~yade-pkg/yade/git-trunk] Rev 3766: update tests according to new gridpfacet module
------------------------------------------------------------
revno: 3766
committer: Klaus Thoeni <klaus.thoeni@xxxxxxxxx>
timestamp: Mon 2015-12-21 09:17:53 +1100
message:
update tests according to new gridpfacet module
modified:
py/tests/__init__.py
py/tests/cohesive-chain.py
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'py/tests/__init__.py'
--- py/tests/__init__.py 2014-07-22 17:23:17 +0000
+++ py/tests/__init__.py 2015-12-20 22:17:53 +0000
@@ -7,8 +7,8 @@
allTests=['wrapper','core','pbc','clump','cohesive-chain']
# all yade modules (ugly...)
-import yade.export,yade.linterpolation,yade.pack,yade.plot,yade.post2d,yade.timing,yade.utils,yade.ymport,yade.geom
-allModules=(yade.export,yade.linterpolation,yade.pack,yade.plot,yade.post2d,yade.timing,yade.utils,yade.ymport,yade.geom)
+import yade.export,yade.linterpolation,yade.pack,yade.plot,yade.post2d,yade.timing,yade.utils,yade.ymport,yade.geom,yade.gridpfacet
+allModules=(yade.export,yade.linterpolation,yade.pack,yade.plot,yade.post2d,yade.timing,yade.utils,yade.ymport,yade.geom,yade.gridpfacet)
try:
import yade.qt
allModules+=(yade.qt,)
@@ -24,7 +24,7 @@
@param module: fully-qualified module name, e.g. yade.tests.wrapper
"""
- suite=unittest.defaultTestLoader().loadTestsFromName(module)
+ suite=unittest.defaultTestLoader.loadTestsFromName(module)
return unittest.TextTestRunner(stream=sys.stdout,verbosity=2).run(suite)
def testAll():
=== modified file 'py/tests/cohesive-chain.py'
--- py/tests/cohesive-chain.py 2015-04-24 15:54:07 +0000
+++ py/tests/cohesive-chain.py 2015-12-20 22:17:53 +0000
@@ -9,7 +9,7 @@
import random
from yade.wrapper import *
from yade._customConverters import *
-from yade import utils
+from yade.gridpfacet import *
from math import *
from minieigen import *
@@ -42,7 +42,7 @@
omeg=95.0/float(Ne); hy=0.05; hz=0.07;
px=float(i)*(omeg/60.0); py=sin(float(i)*omeg)*hy; pz=cos(float(i)*omeg)*hz;
px2=float(i+1.)*(omeg/60.0); py2=sin(float(i+1.)*omeg)*hy; pz2=cos(float(i+1.)*omeg)*hz;
- utils.chainedCylinder(begin=Vector3(pz,py,px), radius=0.005,end=Vector3(pz2,py2,px2),color=Vector3(0.6,0.5,0.5))
+ chainedCylinder(begin=Vector3(pz,py,px), radius=0.005,end=Vector3(pz2,py2,px2),color=Vector3(0.6,0.5,0.5))
O.bodies[Ne-1].state.blockedDOFs='xyzXYZ'
def testMotion(self):
"CohesiveChain: velocity/positions tested in transient dynamics and equilibrium state"