Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test_sunsch #700

Merged
merged 1 commit into from
May 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 2 additions & 19 deletions tests/test_sunsch.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,23 +181,6 @@ def test_templating(tmp_path):
assert "200.3" in str(sch)
assert "1400000" in str(sch)

# Let some of the valued be undefined:
sunschconf = {
"startdate": datetime.date(2020, 1, 1),
"enddate": datetime.date(2021, 1, 1),
"insert": [
{
"template": "template.tmpl",
"days": 10,
"substitute": {"WELLNAME": "A-007"},
}
],
}
sch = sunsch.process_sch_config(sunschconf)
assert "A-007" in str(sch)
assert "<ORAT>" in str(sch)
# (this error is let through sunsch)

# Let the date be undefined.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opm doesn't accept argument anymore. Previously, it was taken as UDQ, but now it's flagged as invalid UDQ (with the new name validation)

sunschconf = {
"startdate": datetime.date(2020, 1, 1),
Expand Down Expand Up @@ -776,7 +759,7 @@ def test_weltarg_uda(tmp_path):
"""WELTARG supports UDA from opm-common 2020.10"""
os.chdir(tmp_path)
weltargkeyword = """WELTARG
'OP-1' ORAT SOMEUDA /
'OP-1' ORAT WU_VALUE /
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace SOMEUDA with WU_VALUE to meet the valid UDQ name criteria.

/
"""
Path("weltarg.sch").write_text(
Expand All @@ -802,7 +785,7 @@ def test_weltarg_uda(tmp_path):
}
sch = sunsch.process_sch_config(sunschconf)
assert "ORAT" in str(sch)
assert "SOMEUDA" in str(sch)
assert "WU_VALUE" in str(sch)


def test_long_udq_lines(tmp_path):
Expand Down