Skip to content

Commit

Permalink
Remove redundant setting of void return of C methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
karandesai-96 committed Apr 3, 2016
1 parent b43f478 commit 17a06a8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tardis/montecarlo/tests/test_cmontecarlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np

from tardis import __path__ as path
from tardis.montecarlo.struct import RPacket, StorageModel, RKState
from tardis.montecarlo.struct import RPacket, StorageModel

test_path = os.path.join(path[0], 'montecarlo', 'test_montecarlo.so')
tests = CDLL(test_path)
Expand Down Expand Up @@ -134,7 +134,6 @@ def test_compute_distance2boundary(packet_params, expected_params, packet, model
packet.r = packet_params['r']
packet.recently_crossed_boundary = packet_params['recently_crossed_boundary']

cmontecarlo_methods.compute_distance2boundary.restype = c_voidp
cmontecarlo_methods.compute_distance2boundary(byref(packet), byref(model))

np.testing.assert_almost_equal(packet.d_boundary, expected_params['d_boundary'])
Expand Down Expand Up @@ -182,7 +181,6 @@ def test_compute_distance2continuum(packet_params, model_params,
packet.virtual_packet = packet_params['virtual_packet']
model.cont_status = model_params['cont_status']

cmontecarlo_methods.compute_distance2continuum.restype = c_voidp
cmontecarlo_methods.compute_distance2continuum(byref(packet), byref(model))

np.testing.assert_almost_equal(packet.chi_cont, expected_params['chi_cont'])
Expand Down Expand Up @@ -217,7 +215,6 @@ def test_increment_j_blue_estimator(packet_params, j_blue_idx, expected, packet,

cmontecarlo_methods.compute_distance2line(byref(packet), byref(model))
cmontecarlo_methods.move_packet(byref(packet), byref(model), c_double(1.e13))
cmontecarlo_methods.increment_j_blue_estimator.restype = c_voidp
cmontecarlo_methods.increment_j_blue_estimator(byref(packet), byref(model),
c_double(packet.d_line), c_int64(j_blue_idx))

Expand Down

0 comments on commit 17a06a8

Please sign in to comment.