Skip to content

Commit

Permalink
Add tests for #473
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent Inverarity committed Jun 25, 2021
1 parent d50d2a9 commit 9c82fb1
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/test_read_header_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,28 @@ def test_unit_with_space():
assert result["unit"] == "1000 lbf"
assert result["value"] == ""
assert result["descr"] == "(RT)"


def test_line_without_period():
line = " DRILLED :12/11/2010"
result = read_header_line(line)
assert result["name"] == "DRILLED"
assert result["value"] == "12/11/2010"

def test_line_without_period_with_space():
line = " PERM DAT :1"
result = read_header_line(line)
assert result["name"] == "PERM DAT"
assert result["value"] == "1"

def test_line_without_period_with_colon():
line = " TIME :14:00:32"
result = read_header_line(line)
assert result["name"] == "TIME"
assert result["value"] == "14:00:32"

def test_line_without_period_with_decimal_value():
line = " HOLE DIA :85.7"
result = read_header_line(line)
assert result["name"] == "HOLE DIA"
assert result["value"] == "85.7"

0 comments on commit 9c82fb1

Please # to comment.