Skip to content

Commit

Permalink
Fix py version test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
karimbahgat committed Jun 1, 2022
1 parent 73a10be commit 2a45a44
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test_shapefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1301,9 +1301,9 @@ def test_write_filelike(tmpdir):
"""
Assert that file-like objects are written correctly.
"""
shp = open(tmpdir.join("test.shp"), mode='wb+')
shx = open(tmpdir.join("test.shx"), mode='wb+')
dbf = open(tmpdir.join("test.dbf"), mode='wb+')
shp = open(tmpdir.join("test.shp").strpath, mode='wb+')
shx = open(tmpdir.join("test.shx").strpath, mode='wb+')
dbf = open(tmpdir.join("test.dbf").strpath, mode='wb+')
with shapefile.Writer(shx=shx, dbf=dbf, shp=shp) as writer:
writer.field('field1', 'C') # required to create a valid dbf file
writer.record('value')
Expand Down Expand Up @@ -1343,9 +1343,9 @@ def test_write_close_filelike(tmpdir):
leaves the shp, shx, and dbf files open
on exit, if given filelike objects.
"""
shp = open(tmpdir.join("test.shp"), mode='wb+')
shx = open(tmpdir.join("test.shx"), mode='wb+')
dbf = open(tmpdir.join("test.dbf"), mode='wb+')
shp = open(tmpdir.join("test.shp").strpath, mode='wb+')
shx = open(tmpdir.join("test.shx").strpath, mode='wb+')
dbf = open(tmpdir.join("test.dbf").strpath, mode='wb+')
sf = shapefile.Writer(shx=shx, dbf=dbf, shp=shp)
sf.field('field1', 'C') # required to create a valid dbf file
sf.record('value')
Expand Down Expand Up @@ -1389,9 +1389,9 @@ def test_write_context_filelike(tmpdir):
leaves the shp, shx, and dbf files open
on exit, if given filelike objects.
"""
shp = open(tmpdir.join("test.shp"), mode='wb+')
shx = open(tmpdir.join("test.shx"), mode='wb+')
dbf = open(tmpdir.join("test.dbf"), mode='wb+')
shp = open(tmpdir.join("test.shp").strpath, mode='wb+')
shx = open(tmpdir.join("test.shx").strpath, mode='wb+')
dbf = open(tmpdir.join("test.dbf").strpath, mode='wb+')
with shapefile.Writer(shx=shx, dbf=dbf, shp=shp) as sf:
sf.field('field1', 'C') # required to create a valid dbf file
sf.record('value')
Expand Down

0 comments on commit 2a45a44

Please sign in to comment.