Skip to content

Commit

Permalink
More PEP-8 edits
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaenriquez committed Nov 13, 2018
1 parent 9ad8400 commit b32b083
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pygridgen/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ def generate_grid(self):
super(Gridgen, self).__init__(x, y)

def to_spec(self):
focus = Focus.from_spec(self.focus.to_spec())
focus = Focus.from_spec(self.focus.to_spec())
output_dict = {'xbry': self.xbry, 'ybry': self.ybry,
'beta': self.beta, 'shape': self.shape,
'focus': focus}
Expand Down
2 changes: 1 addition & 1 deletion pygridgen/tests/test_focus.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def test_focuspoint_to_dict():
assert fp.to_dict() == {'pos': 0.25, 'axis': 'x', 'factor': 4, 'extent': 0.5}
assert fp.to_dict() == fp2.to_dict()


def test_focus_to_from_spec():
fpx = pygridgen.grid._FocusPoint(0.25, 'x', 4, 0.5)
fpy = pygridgen.grid._FocusPoint(0.33, 'y', 0.1, 0.2)
Expand All @@ -177,4 +178,3 @@ def test_focus_to_from_spec():
numpy.testing.assert_equal(dict1.keys(), dict2.keys())
for value1, value2 in zip(dict1.values(), dict2.values()):
assert value1 == value2

2 changes: 1 addition & 1 deletion pygridgen/tests/test_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ def test_mask_poylgon(grid_and_knowns):
grid.mask_polygon(island)
nptest.assert_array_almost_equal(grid.mask_rho, known_mask_rho)


def test_gridgen_to_from_spec():
x = numpy.array([0.50, 2.00, 2.00, 3.50, 3.50, 2.00, 2.00, 0.50, 0.50])
y = numpy.array([0.50, 0.50, 1.75, 1.75, 2.25, 2.25, 3.50, 3.50, 0.50])
Expand All @@ -605,4 +606,3 @@ def test_gridgen_to_from_spec():
# testing - using almost equal due to rounding issues with floats
numpy.testing.assert_array_almost_equal(grid1.x, grid2.x)
numpy.testing.assert_array_almost_equal(grid1.y, grid2.y)

0 comments on commit b32b083

Please sign in to comment.