@@ -259,15 +259,15 @@ def test_reader_url():
259259 with shapefile .Reader (url ) as sf :
260260 for recShape in sf .iterShapeRecords ():
261261 pass
262- assert sf .shp .closed == sf .shx .closed == sf .dbf .closed == True
262+ assert sf .shp .closed == sf .shx .closed == sf .dbf .closed is True
263263
264264 # test without extension
265265 url = "https://github.com/nvkelso/natural-earth-vector/blob/master/110m_cultural/ne_110m_admin_0_tiny_countries?raw=true"
266266 with shapefile .Reader (url ) as sf :
267267 for recShape in sf .iterShapeRecords ():
268268 pass
269269 assert len (sf ) > 0
270- assert sf .shp .closed == sf .shx .closed == sf .dbf .closed == True
270+ assert sf .shp .closed == sf .shx .closed == sf .dbf .closed is True
271271
272272 # test no files found
273273 url = "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/README.md"
@@ -281,7 +281,7 @@ def test_reader_url():
281281 for recShape in sf .iterShapeRecords ():
282282 pass
283283 assert len (sf ) > 0
284- assert sf .shp .closed == sf .shx .closed == sf .dbf .closed == True
284+ assert sf .shp .closed == sf .shx .closed == sf .dbf .closed is True
285285
286286
287287def test_reader_zip ():
@@ -293,7 +293,7 @@ def test_reader_zip():
293293 for recShape in sf .iterShapeRecords ():
294294 pass
295295 assert len (sf ) > 0
296- assert sf .shp .closed == sf .shx .closed == sf .dbf .closed == True
296+ assert sf .shp .closed == sf .shx .closed == sf .dbf .closed is True
297297
298298 # test require specific path when reading multi-shapefile zipfile
299299 with pytest .raises (shapefile .ShapefileException ):
@@ -305,14 +305,14 @@ def test_reader_zip():
305305 for recShape in sf .iterShapeRecords ():
306306 pass
307307 assert len (sf ) > 0
308- assert sf .shp .closed == sf .shx .closed == sf .dbf .closed == True
308+ assert sf .shp .closed == sf .shx .closed == sf .dbf .closed is True
309309
310310 # test specifying the path when reading multi-shapefile zipfile (without extension)
311311 with shapefile .Reader ("shapefiles/blockgroups_multishapefile.zip/blockgroups2" ) as sf :
312312 for recShape in sf .iterShapeRecords ():
313313 pass
314314 assert len (sf ) > 0
315- assert sf .shp .closed == sf .shx .closed == sf .dbf .closed == True
315+ assert sf .shp .closed == sf .shx .closed == sf .dbf .closed is True
316316
317317 # test raising error when can't find shapefile inside zipfile
318318 with pytest .raises (shapefile .ShapefileException ):
@@ -1150,7 +1150,7 @@ def test_write_shp_only(tmpdir):
11501150 assert writer .shp and not writer .shx and not writer .dbf
11511151 assert writer .shpNum == 1
11521152 assert len (writer ) == 1
1153- assert writer .shp .closed == True
1153+ assert writer .shp .closed is True
11541154
11551155 # assert test.shp exists
11561156 assert os .path .exists (filename + '.shp' )
@@ -1180,7 +1180,7 @@ def test_write_shp_shx_only(tmpdir):
11801180 assert writer .shp and writer .shx and not writer .dbf
11811181 assert writer .shpNum == 1
11821182 assert len (writer ) == 1
1183- assert writer .shp .closed == writer .shx .closed == True
1183+ assert writer .shp .closed == writer .shx .closed is True
11841184
11851185 # assert test.shp exists
11861186 assert os .path .exists (filename + '.shp' )
@@ -1214,7 +1214,7 @@ def test_write_shp_dbf_only(tmpdir):
12141214 assert writer .shp and not writer .shx and writer .dbf
12151215 assert writer .shpNum == writer .recNum == 1
12161216 assert len (writer ) == 1
1217- assert writer .shp .closed == writer .dbf .closed == True
1217+ assert writer .shp .closed == writer .dbf .closed is True
12181218
12191219 # assert test.shp exists
12201220 assert os .path .exists (filename + '.shp' )
@@ -1246,7 +1246,7 @@ def test_write_dbf_only(tmpdir):
12461246 assert not writer .shp and not writer .shx and writer .dbf
12471247 assert writer .recNum == 1
12481248 assert len (writer ) == 1
1249- assert writer .dbf .closed == True
1249+ assert writer .dbf .closed is True
12501250
12511251 # assert test.dbf exists
12521252 assert os .path .exists (filename + '.dbf' )
0 commit comments