Rename and add a new test for replacing with a CurveItem
@@ -91,9 +91,17 @@ def test_data_attr():
# the .all() method assumes these are numpy ndarrays; that should be the case.
assert (las.data == np.asarray([[1, 4, 7], [2, 5, 8], [3, 6, 9]])).all()
-def test_replace_curve():
+def test_update_curve():
las = lasio.examples.open("sample.las")
las["NPHI"] = las["NPHI"] * 100
assert "NPHI" in las.keys()
assert not "NPHI:1" in las.keys()
assert not "NPHI:2" in las.keys()
+
+def test_replace_curve():
+ las = lasio.examples.open("sample.las")
+ las["NPHI"] = lasio.CurveItem("NPHI", "%", "Porosity", data=las["NPHI"] * 100)
+ assert "NPHI" in las.keys()
+ assert not "NPHI:1" in las.keys()
+ assert not "NPHI:2" in las.keys()
+
\ No newline at end of file
