Skip to content

Commit

Permalink
Test: use only one thread when testing convert()
Browse files Browse the repository at this point in the history
Unit tests are not supposed to exhaust the cpu on the machine executing
them.
  • Loading branch information
autra committed May 12, 2022
1 parent 1907a1c commit 8cea602
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,24 @@ def test_convert_without_srs(tmp_dir):
with raises(SrsInMissingException):
convert(os.path.join(fixtures_dir, 'without_srs.las'),
outfolder=tmp_dir,
srs_out='4978')
srs_out='4978',
jobs=1)
assert not os.path.exists(os.path.join(tmp_dir))

convert(os.path.join(fixtures_dir, 'without_srs.las'),
outfolder=tmp_dir,
srs_in='3949',
srs_out='4978')
srs_out='4978',
jobs=1)
assert os.path.exists(os.path.join(tmp_dir, 'tileset.json'))
assert os.path.exists(os.path.join(tmp_dir, 'r.pnts'))


def test_convert_with_srs(tmp_dir):
convert(os.path.join(fixtures_dir, 'with_srs.las'),
outfolder=tmp_dir,
srs_out='4978')
srs_out='4978',
jobs=1)
assert os.path.exists(os.path.join(tmp_dir, 'tileset.json'))
assert os.path.exists(os.path.join(tmp_dir, 'r.pnts'))

Expand All @@ -61,6 +64,7 @@ def test_convert_simple_xyz(tmp_dir):
convert(os.path.join(fixtures_dir, 'simple.xyz'),
outfolder=tmp_dir,
srs_in='3857',
srs_out='4978')
srs_out='4978',
jobs=1)
assert os.path.exists(os.path.join(tmp_dir, 'tileset.json'))
assert os.path.exists(os.path.join(tmp_dir, 'r.pnts'))

0 comments on commit 8cea602

Please sign in to comment.