#!/usr/bin/python

import unittest
from corfunc import porod


class TestStringMethods(unittest.TestCase):
    def test_porod(self):
        self.assertEqual(porod(1,1,0), 1)

if __name__ == '__main__':
    unittest.main()

@@ -28,16 +28,35 @@
 nittest%0A
+import numpy as np%0A
 from cor
@@ -72,16 +72,37 @@
 rt porod
+, guinier, fitguinier
 %0A%0A%0Aclass
@@ -203,18 +203,20 @@
 d(1,
+ 
 1,
+ 
 0), 1)%0A%0A
 if _
@@ -211,16 +211,348 @@
 0), 1)%0A%0A
+    def test_guinier(self):%0A        self.assertEqual(guinier(1, 1, 0), 1)%0A%0A    def test_sane_fit(self):%0A        A = np.pi%0A        B = -np.sqrt(2)%0A        x = np.linspace(0, 1, 71)%0A        y = guinier(x, A, B)%0A%0A        g = fitguinier(x, y)%5B0%5D%0A%0A        self.assertAlmostEqual(B, g%5B0%5D)%0A        self.assertAlmostEqual(A, np.exp(g%5B1%5D))%0A%0A
 if __nam

Test guinier fit