44import pytest
55from 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
99params = [
1010 ( # Default
222222
223223@pytest .mark .parametrize ("inputs1, inputs2, expected" , params )
224224def 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 ]\n name = test\n wavelength = 1.54\n scat_quantity = x-ray\n thing1 = 1\n "
254+ "[DiffractionObject ]\n name = test\n wavelength = 1.54\n scat_quantity = x-ray\n thing1 = 1\n "
255255 "thing2 = thing2\n package_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\n 0.000000000000000000e+00 0.000000000000000000e+00\n "
0 commit comments