Skip to content

Commit

Permalink
Remove pprint() calls from test scripts (#19)
Browse files Browse the repository at this point in the history
* remove pprint() calls from test scripts

* comment currently unused import because of commented tests
  • Loading branch information
juleshaas authored Jul 28, 2022
1 parent 79f8054 commit 0ece9e4
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 41 deletions.
5 changes: 0 additions & 5 deletions tests/test_raster_area_stats.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import unittest
import time
from pprint import pprint
from flask.json import loads as json_load
from flask.json import dumps as json_dump

Expand Down Expand Up @@ -68,7 +67,6 @@ def test_sync_raster_area_stats_1(self):
content_type="application/json",
)

pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand All @@ -91,7 +89,6 @@ def test_sync_raster_area_stats_2(self):
content_type="application/json",
)

pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand All @@ -113,7 +110,6 @@ def test_sync_raster_area_stats_error_wrong_content_type(self):
content_type="application/json",
)

pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand All @@ -132,7 +128,6 @@ def test_sync_raster_area_stats_error_wrong_request_missing_json(self):
content_type="application/json",
)

pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand Down
8 changes: 1 addition & 7 deletions tests/test_raster_area_stats_univar.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import unittest
from pprint import pprint
from flask.json import loads as json_load
# from flask.json import loads as json_load
from flask.json import dumps as json_dump

try:
Expand Down Expand Up @@ -79,7 +78,6 @@ def test_sync_raster_area_stats_1(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand Down Expand Up @@ -107,7 +105,6 @@ def test_sync_raster_area_stats_2(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand All @@ -133,7 +130,6 @@ def test_sync_raster_area_stats_error_wrong_content_type(self):
content_type="application/XML",
)

pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand All @@ -153,7 +149,6 @@ def test_sync_raster_area_stats_module_error(self):
content_type="application/json",
)

pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand All @@ -173,7 +168,6 @@ def test_sync_raster_area_stats_nodata_error(self):
content_type="application/json",
)

pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand Down
4 changes: 0 additions & 4 deletions tests/test_raster_sample.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import unittest
import time
from pprint import pprint
from flask.json import loads as json_load
from flask.json import dumps as json_dump

Expand Down Expand Up @@ -57,7 +56,6 @@ def test_async_sampling(self):
content_type="application/json",
)

pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand Down Expand Up @@ -115,7 +113,6 @@ def test_sync_sampling(self):
["p2", "635676.0", "226371.0"]]}),
content_type="application/json")
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code, 200, "HTML status code is wrong %i"
% rv.status_code)
Expand Down Expand Up @@ -145,7 +142,6 @@ def test_sync_sampling_geojson(self):
data=json_dump(JSON),
content_type="application/json")
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code, 200, "HTML status code is wrong %i"
% rv.status_code)
Expand Down
9 changes: 0 additions & 9 deletions tests/test_strds_area_stats.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import unittest
# import time
# from pprint import pprint
# from flask.json import loads as json_load
# from flask.json import dumps as json_dump
#
Expand Down Expand Up @@ -58,7 +57,6 @@ def test_async_raster_area_stats_json(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand All @@ -83,7 +81,6 @@ def test_sync_raster_area_stats_1(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand All @@ -109,7 +106,6 @@ def test_sync_raster_area_stats_2(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand All @@ -133,7 +129,6 @@ def test_sync_raster_area_stats_error_no_map_found(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand All @@ -154,7 +149,6 @@ def test_sync_raster_area_stats_wrong_content_type(self):
content_type="application/XML",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand All @@ -175,7 +169,6 @@ def test_sync_raster_area_stats_error_nodata(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand All @@ -196,7 +189,6 @@ def test_sync_raster_area_stats_error(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand All @@ -217,7 +209,6 @@ def test_sync_raster_area_stats_error_wrong_timestamp(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand Down
8 changes: 0 additions & 8 deletions tests/test_strds_area_stats_univar.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import unittest
# import time
# from pprint import pprint
# from flask.json import loads as json_load
# from flask.json import dumps as json_dump

Expand Down Expand Up @@ -61,7 +60,6 @@ def test_async_raster_area_stats_json(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand All @@ -88,7 +86,6 @@ def test_sync_raster_area_stats_1(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand All @@ -113,7 +110,6 @@ def test_sync_raster_area_stats_2(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand All @@ -138,7 +134,6 @@ def test_sync_raster_area_stats_error_no_map_found(self):
content_type="text/XML",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand All @@ -159,7 +154,6 @@ def test_sync_raster_area_stats_module_error(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand All @@ -180,7 +174,6 @@ def test_sync_raster_area_stats_error_nodata(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand All @@ -201,7 +194,6 @@ def test_sync_raster_area_stats_error_wrong_timestamp(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
400,
Expand Down
5 changes: 0 additions & 5 deletions tests/test_strds_sample.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import unittest
# import time
# from pprint import pprint
# from flask.json import loads as json_load
# from flask.json import dumps as json_dump
#
Expand Down Expand Up @@ -78,7 +77,6 @@ def test_async_sampling(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand Down Expand Up @@ -138,7 +136,6 @@ def test_sync_sampling(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand Down Expand Up @@ -168,7 +165,6 @@ def test_sync_sampling_geojson(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand Down Expand Up @@ -205,7 +201,6 @@ def test_sync_sampling_where(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand Down
3 changes: 0 additions & 3 deletions tests/test_vector_sample.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import unittest
# import time
# from pprint import pprint
# from flask.json import loads as json_load
# from flask.json import dumps as json_dump
#
Expand Down Expand Up @@ -39,7 +38,6 @@ def test_async_sampling(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand Down Expand Up @@ -100,7 +98,6 @@ def test_sync_sampling(self):
content_type="application/json",
)
pprint(json_load(rv.data))
self.assertEqual(
rv.status_code,
200,
Expand Down

0 comments on commit 0ece9e4

Please sign in to comment.