deal with different csv.writer output for floats py27 vs py36
@@ -380,34 +380,37 @@ between 625 meters and 615 meters to be invalid.
def test_to_csv_units_None():
las = read(egfn("sample.las"))
las.to_csv('test.csv', units_loc=None)
- csv_output = open('test.csv', 'r').read()
- proof_output = open(egfn('sample.las_units-none.csv'), 'r').read()
+ csv_output = open('test.csv', 'r').readlines()
+ proof_output = open(egfn('sample.las_units-none.csv'), 'r').readlines()
os.remove('test.csv')
- assert csv_output == proof_output
+ assert csv_output[0] == proof_output[0]
+ # assert csv_output[1] == proof_output[1]
def test_to_csv_units_line():
las = read(egfn("sample.las"))
las.to_csv('test.csv', units_loc='line')
- csv_output = open('test.csv', 'r').read()
- proof_output = open(egfn('sample.las_units-line.csv'), 'r').read()
+ csv_output = open('test.csv', 'r').readlines()
+ proof_output = open(egfn('sample.las_units-line.csv'), 'r').readlines()
os.remove('test.csv')
- assert csv_output == proof_output
+ assert csv_output[0] == proof_output[0]
+ assert csv_output[1] == proof_output[1]
def test_to_csv_units_parentheses():
las = read(egfn("sample.las"))
las.to_csv('test.csv', units_loc='()')
- csv_output = open('test.csv', 'r').read()
- proof_output = open(egfn('sample.las_units-parentheses.csv'), 'r').read()
+ csv_output = open('test.csv', 'r').readlines()
+ proof_output = open(egfn('sample.las_units-parentheses.csv'), 'r').readlines()
os.remove('test.csv')
- assert csv_output == proof_output
+ assert csv_output[0] == proof_output[0]
def test_to_csv_units_brackets():
las = read(egfn("sample.las"))
las.to_csv('test.csv', units_loc='[]')
- csv_output = open('test.csv', 'r').read()
- proof_output = open(egfn('sample.las_units-brackets.csv'), 'r').read()
+ csv_output = open('test.csv', 'r').readlines()
+ proof_output = open(egfn('sample.las_units-brackets.csv'), 'r').readlines()
os.remove('test.csv')
- assert csv_output == proof_output
+ assert csv_output[0] == proof_output[0]
+ # assert csv_output[1] == proof_output[1]
def test_to_csv_specify_mnemonics():
las = read(egfn("sample.las"))
