@@ -411,9 +411,9 @@ def test_reader_shapefile_type():
411411 is returned correctly.
412412 """
413413 with shapefile .Reader ("shapefiles/blockgroups" ) as sf :
414- assert sf .shapeType is 5 # 5 means Polygon
415- assert sf .shapeType is shapefile .POLYGON
416- assert sf .shapeTypeName is "POLYGON"
414+ assert sf .shapeType == 5 # 5 means Polygon
415+ assert sf .shapeType == shapefile .POLYGON
416+ assert sf .shapeTypeName == "POLYGON"
417417
418418
419419def test_reader_shapefile_length ():
@@ -429,9 +429,9 @@ def test_reader_shapefile_length():
429429def test_shape_metadata ():
430430 with shapefile .Reader ("shapefiles/blockgroups" ) as sf :
431431 shape = sf .shape (0 )
432- assert shape .shapeType is 5 # Polygon
433- assert shape .shapeType is shapefile .POLYGON
434- assert sf .shapeTypeName is "POLYGON"
432+ assert shape .shapeType == 5 # Polygon
433+ assert shape .shapeType == shapefile .POLYGON
434+ assert sf .shapeTypeName == "POLYGON"
435435
436436
437437def test_reader_fields ():
@@ -497,9 +497,9 @@ def test_reader_shp_shx_only():
497497 with shapefile .Reader (shp = "shapefiles/blockgroups.shp" , shx = "shapefiles/blockgroups.shx" ) as sf :
498498 assert len (sf ) == 663
499499 shape = sf .shape (3 )
500- assert len (shape .points ) is 173
500+ assert len (shape .points ) == 173
501+
501502
502-
503503def test_reader_shp_dbf_only ():
504504 """
505505 Assert that specifying just the
@@ -509,7 +509,7 @@ def test_reader_shp_dbf_only():
509509 with shapefile .Reader (shp = "shapefiles/blockgroups.shp" , dbf = "shapefiles/blockgroups.dbf" ) as sf :
510510 assert len (sf ) == 663
511511 shape = sf .shape (3 )
512- assert len (shape .points ) is 173
512+ assert len (shape .points ) == 173
513513 record = sf .record (3 )
514514 assert record [1 :3 ] == ['060750601001' , 4715 ]
515515
@@ -523,7 +523,7 @@ def test_reader_shp_only():
523523 with shapefile .Reader (shp = "shapefiles/blockgroups.shp" ) as sf :
524524 assert len (sf ) == 663
525525 shape = sf .shape (3 )
526- assert len (shape .points ) is 173
526+ assert len (shape .points ) == 173
527527
528528
529529def test_reader_filelike_dbf_only ():
@@ -547,7 +547,7 @@ def test_reader_filelike_shp_shx_only():
547547 with shapefile .Reader (shp = open ("shapefiles/blockgroups.shp" , "rb" ), shx = open ("shapefiles/blockgroups.shx" , "rb" )) as sf :
548548 assert len (sf ) == 663
549549 shape = sf .shape (3 )
550- assert len (shape .points ) is 173
550+ assert len (shape .points ) == 173
551551
552552
553553def test_reader_filelike_shp_dbf_only ():
@@ -559,7 +559,7 @@ def test_reader_filelike_shp_dbf_only():
559559 with shapefile .Reader (shp = open ("shapefiles/blockgroups.shp" , "rb" ), dbf = open ("shapefiles/blockgroups.dbf" , "rb" )) as sf :
560560 assert len (sf ) == 663
561561 shape = sf .shape (3 )
562- assert len (shape .points ) is 173
562+ assert len (shape .points ) == 173
563563 record = sf .record (3 )
564564 assert record [1 :3 ] == ['060750601001' , 4715 ]
565565
@@ -573,7 +573,7 @@ def test_reader_filelike_shp_only():
573573 with shapefile .Reader (shp = open ("shapefiles/blockgroups.shp" , "rb" )) as sf :
574574 assert len (sf ) == 663
575575 shape = sf .shape (3 )
576- assert len (shape .points ) is 173
576+ assert len (shape .points ) == 173
577577
578578
579579def test_reader_shapefile_delayed_load ():
@@ -1101,7 +1101,7 @@ def test_shaperecord_shape():
11011101 shaperec = sf .shapeRecord (3 )
11021102 shape = shaperec .shape
11031103 point = shape .points [0 ]
1104- assert len (point ) is 2
1104+ assert len (point ) == 2
11051105
11061106
11071107def test_shaperecord_record ():
0 commit comments