summaryrefslogtreecommitdiff
path: root/python-lmfit/test.patch
blob: 603fc8707a5112c9e345603c69c97288bf035904 (plain)
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
--- a/tests/test_saveload.py	2018-02-11 15:08:45.000000000 +0100
+++ b/tests/test_saveload.py	2018-02-23 09:41:17.335712453 +0100
@@ -14,7 +14,7 @@
 except ImportError:
     DILL_AVAILABLE = False
 
-dat = np.loadtxt(os.path.join('..', 'examples', 'NIST_Gauss2.dat'))
+dat = np.loadtxt(os.path.join(os.path.dirname(__file__), '..', 'examples', 'NIST_Gauss2.dat'))
 XDAT = dat[:, 1]
 YDAT = dat[:, 0]
 
--- a/tests/test_height_fwhm.py	2018-02-11 15:08:45.000000000 +0100
+++ b/tests/test_height_fwhm.py	2018-02-23 09:41:41.030806931 +0100
@@ -8,6 +8,7 @@
 from scipy.optimize import fsolve
 import sys
 
+import os
 
 # Turn off plotting if run by nosetests.
 WITHPLOT = True
@@ -76,7 +76,7 @@
     # sigma = np.sqrt(variance)
     # x = np.linspace(mu - 20*sigma, mu + 20*sigma, 100.0)
     # y = norm.pdf(x, mu, 1)
-    data = np.loadtxt('../examples/test_peak.dat')
+    data = np.loadtxt(os.path.join(os.path.dirname(__file__), '..', 'examples', 'test_peak.dat'))
     x = data[:, 0]
     y = data[:, 1]
     check_height_fwhm(x, y, lineshapes.voigt, models.VoigtModel())