Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix a few warnings in tests.
  • Loading branch information
inducer committed May 23, 2010
1 parent 4480478 commit 4a2c83b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
5 changes: 2 additions & 3 deletions test/static_field.py
Expand Up @@ -262,7 +262,7 @@ def velocities(self, t):


def run_setup(units, casename, setup, discr, pusher, visualize=False):
from hedge.timestep import RK4TimeStepper
from hedge.timestep.runge_kutta import LSRK4TimeStepper
from hedge.visualization import SiloVisualizer
from hedge.models.em import MaxwellOperator

Expand Down Expand Up @@ -314,8 +314,7 @@ def rhs(t, ts_state):
return (p_rhs_calculator(t, lambda: fields, lambda: ts_state.state)
+ f2p_rhs_calculator(t, lambda: fields, lambda: ts_state.state))

stepper = RK4TimeStepper()
from time import time
stepper = LSRK4TimeStepper()
t = 0

bbox = discr.mesh.bounding_box()
Expand Down
16 changes: 10 additions & 6 deletions test/test_pyrticle.py
Expand Up @@ -159,8 +159,8 @@ def rhs(t, y):
0, # drecon
])

from hedge.timestep import RK4TimeStepper
stepper = RK4TimeStepper()
from hedge.timestep.runge_kutta import LSRK4TimeStepper
stepper = LSRK4TimeStepper()
t = 0

from pyrticle.cloud import TimesteppablePicState
Expand All @@ -187,7 +187,7 @@ def rhs(t, y):

@mark_test.long
def test_efield_vs_gauss_law():
from hedge.mesh import \
from hedge.mesh.generator import \
make_box_mesh, \
make_cylinder_mesh
from math import sqrt, pi
Expand Down Expand Up @@ -335,7 +335,7 @@ def test_with_static_fields():
units = SIUnitsWithNaturalConstants()

from hedge.discretization.local import TetrahedronDiscretization
from hedge.mesh import \
from hedge.mesh.generator import \
make_box_mesh, \
make_cylinder_mesh
from hedge.discretization import Discretization
Expand Down Expand Up @@ -423,5 +423,9 @@ def test_shape_functions():


if __name__ == "__main__":
from py.test.cmdline import main
main([__file__])
import sys
if len(sys.argv) > 1:
exec sys.argv[1]
else:
from py.test.cmdline import main
main([__file__])

0 comments on commit 4a2c83b

Please sign in to comment.