Skip to content

Commit

Permalink
style fixes to make flake8 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
coleslaw481 committed Jun 23, 2017
1 parent d10466f commit 27f089e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
1 change: 0 additions & 1 deletion chmutil/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,4 +450,3 @@ def get_total_pixels(self):
:returns: total number of pixels ie W x H x # images
"""
return self._total_pixels

3 changes: 2 additions & 1 deletion tests/test_createchmjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ def test_create_chm_job_success_withgentifs_set(self):
chmconfig = fac.get_chmconfig(skip_loading_mergeconfig=False)
mcon = chmconfig.get_merge_config()
self.assertEqual(mcon.getboolean(CHMJobCreator.CONFIG_DEFAULT,
CHMJobCreator.MERGE_GENTIFS), True)
CHMJobCreator.MERGE_GENTIFS),
True)
finally:
shutil.rmtree(temp_dir)

Expand Down
10 changes: 5 additions & 5 deletions tests/test_image_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ def test_get_image_path_with_longest_number_keysort(self):
func = core.get_longest_sequence_of_numbers_in_string
# no files
res = image.get_image_path_list(temp_dir, None,
keysortfunc=func)
keysortfunc=func)
self.assertEqual(len(res), 0)

# one file
onefile = os.path.join(temp_dir, 'foo.2345.txt')
open(onefile, 'a').close()
res = image.get_image_path_list(temp_dir, None,
keysortfunc=func)
keysortfunc=func)
self.assertEqual(len(res), 1)
self.assertTrue(onefile in res)

Expand All @@ -109,15 +109,15 @@ def test_get_image_path_with_longest_number_keysort(self):
adir = os.path.join(temp_dir, 'somedir.png')
os.makedirs(adir, mode=0o775)
res = image.get_image_path_list(temp_dir, None,
keysortfunc=func)
keysortfunc=func)
self.assertEqual(len(res), 2)
self.assertTrue(onefile in res)
self.assertTrue(twofile in res)
self.assertEqual(res[0], twofile)

# suffix set to .png
res = image.get_image_path_list(temp_dir, '.png',
keysortfunc=func)
keysortfunc=func)
self.assertEqual(len(res), 1)
self.assertTrue(twofile in res)

Expand All @@ -134,7 +134,7 @@ def test_get_image_path_with_longest_number_keysort(self):
open(af, 'a').close()

res = image.get_image_path_list(temp_dir, '.png',
keysortfunc=func)
keysortfunc=func)
self.assertEqual(len(res), 1000)
finally:
shutil.rmtree(temp_dir)
Expand Down
1 change: 0 additions & 1 deletion tests/test_imagestats.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@ def test_constructor(self):
self.assertEqual(im_stats.get_size_in_bytes(), 123)



if __name__ == '__main__':
unittest.main()
5 changes: 3 additions & 2 deletions tests/test_tasksummaryfactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def test_get_image_stats_summary_output_compute_false(self):
def test_get_image_stats_summary_output_compute_true_but_invalid_dir(self):
temp_dir = tempfile.mkdtemp()
try:
con = CHMConfig(os.path.join(temp_dir,'images'),
con = CHMConfig(os.path.join(temp_dir, 'images'),
'./model', './outdir', '500x500', '20x20')
cfig = configparser.ConfigParser()
cfig.add_section('1')
Expand Down Expand Up @@ -456,7 +456,8 @@ def test_get_image_stats_summary_output_compute_true_one_image(self):
self.assertEqual(isum.get_image_count(), 1)
self.assertEqual(isum.get_total_pixels(), 100)
self.assertEqual(isum.get_total_size_of_images_in_bytes(), expsize)
self.assertEqual(isum.get_image_dimensions_as_dict(), {(10,10): 1})
self.assertEqual(isum.get_image_dimensions_as_dict(),
{(10, 10): 1})

finally:
shutil.rmtree(temp_dir)
Expand Down

0 comments on commit 27f089e

Please sign in to comment.