Skip to content

Commit 85a2019

Browse files
committed
Fix whitespace.
1 parent 1aee9d0 commit 85a2019

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

‎python3.3/ScrapeCountries.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(self, numCols, extractionMap, exceptions, strict=False):
6363
self.__numCols = numCols
6464
self.__extractionMap = extractionMap
6565
self.__exceptions = exceptions
66-
66+
6767
# Maintain our position within tags.
6868
self.__in_tr = False
6969
self.__in_td = False
@@ -92,7 +92,7 @@ def handle_starttag(self, tag, attrs):
9292
self.__possible_data.append("")
9393
elif tag == "td":
9494
self.__in_td = True
95-
95+
9696
def handle_endtag(self, tag):
9797
if tag == "tr":
9898
self.__in_tr = False
@@ -117,7 +117,7 @@ def handle_endtag(self, tag):
117117
elif tag == "td":
118118
self.__in_td = False
119119
self.__td_position += 1
120-
120+
121121
# If our criteria match, we know our position in the table.
122122
# Keep track of the data.
123123
def handle_data(self, data):

‎python3.3/ScrapeCountriesTest.py‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def safeDelete(name):
5959
subsection("Checking output.")
6060
try:
6161
output = open(outName, encoding="utf8")
62-
62+
6363
# 1. Check number of lines.
6464
assert countLines(output) == 227, "Incorrect number of lines."
6565

@@ -70,7 +70,7 @@ def safeDelete(name):
7070
assert afghanistan[0] == "Afghanistan", "Incorrect content (1)."
7171
assert afghanistan[1] == "أفغانستان", "Incorrect content (2)."
7272
assert afghanistan[2] == "Afghanestan", "Incorrect content (3)."
73-
73+
7474
zimbabwe = lines[226].split("\t")
7575
assert zimbabwe[0] == "Zimbabwe", "Incorrect content (4)."
7676
assert zimbabwe[1] == "زمبابوي", "Incorrect content (5)."
@@ -95,12 +95,12 @@ def safeDelete(name):
9595
try:
9696
f = open(outName, "rb")
9797
countryData = pickle.load(f)
98-
98+
9999
afghanistan = countryData[0]
100100
assert afghanistan[0] == "Afghanistan", "Incorrect content (1)."
101101
assert afghanistan[1] == "أفغانستان", "Incorrect content (2)."
102102
assert afghanistan[2] == "Afghanestan", "Incorrect content (3)."
103-
103+
104104
zimbabwe = countryData[226]
105105
assert zimbabwe[0] == "Zimbabwe", "Incorrect content (4)."
106106
assert zimbabwe[1] == "زمبابوي", "Incorrect content (5)."
@@ -125,7 +125,7 @@ def safeDelete(name):
125125
subsection("Checking output.")
126126
try:
127127
output = open(outName, encoding="utf8")
128-
128+
129129
# 1. Check number of lines.
130130
assert countLines(output) == 205, "Incorrect number of lines."
131131

@@ -161,7 +161,7 @@ def safeDelete(name):
161161
subsection("Checking output.")
162162
try:
163163
output = open(outName, encoding="utf8")
164-
164+
165165
# 1. Check number of lines.
166166
assert countLines(output) == 247, "Incorrect number of lines."
167167

@@ -195,7 +195,7 @@ def safeDelete(name):
195195
subsection("Checking output.")
196196
try:
197197
output = open(outName, encoding="utf8")
198-
198+
199199
# 1. Check number of lines.
200200
assert countLines(output) == 237, "Incorrect number of lines."
201201

@@ -229,7 +229,7 @@ def safeDelete(name):
229229
subsection("Checking output.")
230230
try:
231231
output = open(outName, encoding="utf8")
232-
232+
233233
# 1. Check number of lines.
234234
assert countLines(output) == 250, "Incorrect number of lines."
235235

@@ -261,7 +261,7 @@ def safeDelete(name):
261261
subsection("Checking output.")
262262
try:
263263
output = open(outName, encoding="utf8")
264-
264+
265265
# 1. Check number of lines.
266266
assert countLines(output) == 250, "Incorrect number of lines."
267267

@@ -294,7 +294,7 @@ def safeDelete(name):
294294
subsection("Checking output.")
295295
try:
296296
output = open(outName, encoding="utf8")
297-
297+
298298
# 1. Check number of lines.
299299
assert countLines(output) == 227, "Incorrect number of lines."
300300

@@ -327,7 +327,7 @@ def safeDelete(name):
327327
subsection("Checking output.")
328328
try:
329329
output = open(outName, encoding="utf8")
330-
330+
331331
# 1. Check number of lines.
332332
assert countLines(output) == 237, "Incorrect number of lines."
333333

0 commit comments

Comments
 (0)