Skip to content

Commit 2e15a77

Browse files
committed
Modify tests for DiffractionObject
1 parent b18d485 commit 2e15a77

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/diffpy/utils/scattering_objects/test_diffraction_objects.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pytest
55
from freezegun import freeze_time
66

7-
from diffpy.utils.scattering_objects.diffraction_objects import Diffraction_object
7+
from diffpy.utils.scattering_objects.diffraction_objects import DiffractionObject
88

99
params = [
1010
( # Default
@@ -222,8 +222,8 @@
222222

223223
@pytest.mark.parametrize("inputs1, inputs2, expected", params)
224224
def test_diffraction_objects_equality(inputs1, inputs2, expected):
225-
diffraction_object1 = Diffraction_object()
226-
diffraction_object2 = Diffraction_object()
225+
diffraction_object1 = DiffractionObject()
226+
diffraction_object2 = DiffractionObject()
227227
diffraction_object1_attributes = [key for key in diffraction_object1.__dict__ if not key.startswith("_")]
228228
for i, attribute in enumerate(diffraction_object1_attributes):
229229
setattr(diffraction_object1, attribute, inputs1[i])
@@ -235,7 +235,7 @@ def test_dump(tmp_path, mocker):
235235
x, y = np.linspace(0, 5, 6), np.linspace(0, 5, 6)
236236
directory = Path(tmp_path)
237237
file = directory / "testfile"
238-
test = Diffraction_object()
238+
test = DiffractionObject()
239239
test.wavelength = 1.54
240240
test.name = "test"
241241
test.scat_quantity = "x-ray"
@@ -251,7 +251,7 @@ def test_dump(tmp_path, mocker):
251251
with open(file, "r") as f:
252252
actual = f.read()
253253
expected = (
254-
"[Diffraction_object]\nname = test\nwavelength = 1.54\nscat_quantity = x-ray\nthing1 = 1\n"
254+
"[DiffractionObject]\nname = test\nwavelength = 1.54\nscat_quantity = x-ray\nthing1 = 1\n"
255255
"thing2 = thing2\npackage_info = {'package2': '3.4.5', 'diffpy.utils': '3.3.0'}\n"
256256
"creation_time = 2012-01-14 00:00:00\n\n"
257257
"#### start data\n0.000000000000000000e+00 0.000000000000000000e+00\n"

0 commit comments

Comments
 (0)