@@ -411,9 +411,9 @@ def test_reader_shapefile_type():
411
411
is returned correctly.
412
412
"""
413
413
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"
417
417
418
418
419
419
def test_reader_shapefile_length ():
@@ -429,9 +429,9 @@ def test_reader_shapefile_length():
429
429
def test_shape_metadata ():
430
430
with shapefile .Reader ("shapefiles/blockgroups" ) as sf :
431
431
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"
435
435
436
436
437
437
def test_reader_fields ():
@@ -497,9 +497,9 @@ def test_reader_shp_shx_only():
497
497
with shapefile .Reader (shp = "shapefiles/blockgroups.shp" , shx = "shapefiles/blockgroups.shx" ) as sf :
498
498
assert len (sf ) == 663
499
499
shape = sf .shape (3 )
500
- assert len (shape .points ) is 173
500
+ assert len (shape .points ) == 173
501
+
501
502
502
-
503
503
def test_reader_shp_dbf_only ():
504
504
"""
505
505
Assert that specifying just the
@@ -509,7 +509,7 @@ def test_reader_shp_dbf_only():
509
509
with shapefile .Reader (shp = "shapefiles/blockgroups.shp" , dbf = "shapefiles/blockgroups.dbf" ) as sf :
510
510
assert len (sf ) == 663
511
511
shape = sf .shape (3 )
512
- assert len (shape .points ) is 173
512
+ assert len (shape .points ) == 173
513
513
record = sf .record (3 )
514
514
assert record [1 :3 ] == ['060750601001' , 4715 ]
515
515
@@ -523,7 +523,7 @@ def test_reader_shp_only():
523
523
with shapefile .Reader (shp = "shapefiles/blockgroups.shp" ) as sf :
524
524
assert len (sf ) == 663
525
525
shape = sf .shape (3 )
526
- assert len (shape .points ) is 173
526
+ assert len (shape .points ) == 173
527
527
528
528
529
529
def test_reader_filelike_dbf_only ():
@@ -547,7 +547,7 @@ def test_reader_filelike_shp_shx_only():
547
547
with shapefile .Reader (shp = open ("shapefiles/blockgroups.shp" , "rb" ), shx = open ("shapefiles/blockgroups.shx" , "rb" )) as sf :
548
548
assert len (sf ) == 663
549
549
shape = sf .shape (3 )
550
- assert len (shape .points ) is 173
550
+ assert len (shape .points ) == 173
551
551
552
552
553
553
def test_reader_filelike_shp_dbf_only ():
@@ -559,7 +559,7 @@ def test_reader_filelike_shp_dbf_only():
559
559
with shapefile .Reader (shp = open ("shapefiles/blockgroups.shp" , "rb" ), dbf = open ("shapefiles/blockgroups.dbf" , "rb" )) as sf :
560
560
assert len (sf ) == 663
561
561
shape = sf .shape (3 )
562
- assert len (shape .points ) is 173
562
+ assert len (shape .points ) == 173
563
563
record = sf .record (3 )
564
564
assert record [1 :3 ] == ['060750601001' , 4715 ]
565
565
@@ -573,7 +573,7 @@ def test_reader_filelike_shp_only():
573
573
with shapefile .Reader (shp = open ("shapefiles/blockgroups.shp" , "rb" )) as sf :
574
574
assert len (sf ) == 663
575
575
shape = sf .shape (3 )
576
- assert len (shape .points ) is 173
576
+ assert len (shape .points ) == 173
577
577
578
578
579
579
def test_reader_shapefile_delayed_load ():
@@ -1101,7 +1101,7 @@ def test_shaperecord_shape():
1101
1101
shaperec = sf .shapeRecord (3 )
1102
1102
shape = shaperec .shape
1103
1103
point = shape .points [0 ]
1104
- assert len (point ) is 2
1104
+ assert len (point ) == 2
1105
1105
1106
1106
1107
1107
def test_shaperecord_record ():
0 commit comments