Skip to content

Commit 83e6f3f

Browse files
committed
tests: added placeholders for ReflectionProfile unit tests
1 parent 81eaccd commit 83e6f3f

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

tests/test_reflectionprofile.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
"""
2+
Unit tests for pyobjcryst.reflectionprofile bindings.
3+
4+
TODO:
5+
- ReflectionProfile.GetProfile
6+
- ReflectionProfile.GetFullProfileWidth
7+
- ReflectionProfile.XMLOutput / XMLInput
8+
- ReflectionProfile.CreateCopy
9+
"""
10+
11+
import unittest
12+
import pytest
13+
import numpy as np
14+
15+
from pyobjcryst.powderpattern import PowderPattern
16+
17+
18+
class TestReflectionProfile(unittest.TestCase):
19+
"""Tests for ReflectionProfile methods"""
20+
21+
@pytest.fixture(autouse=True)
22+
def prepare_fixture(self, loadcifdata):
23+
self.loadcifdata = loadcifdata
24+
25+
def setUp(self):
26+
"""Set up a ReflectionProfile instance for testing."""
27+
x = np.linspace(0, 40, 8001)
28+
c = self.loadcifdata("paracetamol.cif")
29+
30+
self.pp = PowderPattern()
31+
self.pp.SetWavelength(0.7)
32+
self.pp.SetPowderPatternX(np.deg2rad(x))
33+
self.pp.SetPowderPatternObs(np.ones_like(x))
34+
35+
self.ppd = self.pp.AddPowderPatternDiffraction(c)
36+
37+
self.profile = self.ppd.GetProfile()
38+
39+
def test_get_computed_profile(self):
40+
assert True
41+
42+
def test_get_profile_width(self):
43+
assert True
44+
45+
def test_create_copy(self):
46+
assert True
47+
48+
def test_xml_input(self):
49+
assert True
50+
51+
def test_xml_output(self):
52+
assert True
53+
54+
55+
if __name__ == "__main__":
56+
unittest.main()

0 commit comments

Comments
 (0)