ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since ec1c554 was
ec1c554,
checked in by Jae Cho <jhjcho@…>, 14 years ago
|
added polymerexclVolume model and its test
|
-
Property mode set to
100644
|
File size:
703 bytes
|
Rev | Line | |
---|
[ec1c554] | 1 | """ |
---|
| 2 | Unit tests for extra models |
---|
| 3 | """ |
---|
| 4 | import unittest |
---|
| 5 | class TestPolymerExclVolume(unittest.TestCase): |
---|
| 6 | """ |
---|
| 7 | Unit tests for PolymerexclVolume (non-shape) function |
---|
| 8 | """ |
---|
| 9 | def setUp(self): |
---|
| 10 | from sans.models.PolymerExclVolume import PolymerExclVolume |
---|
| 11 | self.model= PolymerExclVolume() |
---|
| 12 | |
---|
| 13 | def test1D(self): |
---|
| 14 | # the values are from Igor pro calculation |
---|
| 15 | self.assertAlmostEqual(self.model.run(0.001), 0.998801, 6) |
---|
| 16 | self.assertAlmostEqual(self.model.run(0.21571), 0.00192041, 6) |
---|
| 17 | self.assertAlmostEqual(self.model.runXY(0.41959), 0.000261302, 6) |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | if __name__ == '__main__': |
---|
| 21 | unittest.main() |
---|
Note: See
TracBrowser
for help on using the repository browser.