File: test_CSDS.py

package info (click to toggle)
pyxrd 0.8.4-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,848 kB
  • sloc: python: 26,500; sh: 301; makefile: 128
file content (63 lines) | stat: -rw-r--r-- 1,618 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/python

# coding=UTF-8
# ex:ts=4:sw=4:et=on

# Copyright (c) 2013, Mathijs Dumon
# All rights reserved.
# Complete license can be found in the LICENSE file.

import unittest

from test.utils import create_object_attribute_test

from pyxrd.phases.models.CSDS import LogNormalCSDSDistribution, DritsCSDSDistribution

__all__ = [
    'TestLogNormalCSDSDistribution',
    'TestDritsCSDSDistribution'
]

class TestLogNormalCSDSDistribution(unittest.TestCase):

    component = None

    def setUp(self):
        self.CSDS = LogNormalCSDSDistribution()

    def tearDown(self):
        del self.CSDS

    def test_not_none(self):
        self.assertIsNotNone(self.CSDS)

    def test_data_object(self):
        self.assertIsNotNone(self.CSDS.data_object)

    test_average = create_object_attribute_test("CSDS", "average", 15)
    test_alpha_scale = create_object_attribute_test("CSDS", "alpha_scale", 0.5)
    test_alpha_offset = create_object_attribute_test("CSDS", "alpha_offset", 0.6)
    test_beta_scale = create_object_attribute_test("CSDS", "alpha_scale", 0.5)
    test_beta_offset = create_object_attribute_test("CSDS", "alpha_offset", 0.6)

    pass # end of class

class TestDritsCSDSDistribution(unittest.TestCase):

    component = None

    def setUp(self):
        self.CSDS = DritsCSDSDistribution()

    def tearDown(self):
        del self.CSDS

    def test_not_none(self):
        self.assertIsNotNone(self.CSDS)

    def test_data_object(self):
        self.assertIsNotNone(self.CSDS.data_object)

    test_average = create_object_attribute_test("CSDS", "average", 15)

    pass # end of class