From d1e58ac97d6c34eb7aef0a566f725b61e41f4942 Mon Sep 17 00:00:00 2001
From: MoritzThomasHuebner <email@moritz-huebner.de>
Date: Wed, 5 Sep 2018 17:25:39 +1000
Subject: [PATCH] Fixed an error when writing test files

---
 test/detector_tests.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/detector_tests.py b/test/detector_tests.py
index 35bd2b647..eb9e90e8b 100644
--- a/test/detector_tests.py
+++ b/test/detector_tests.py
@@ -852,9 +852,9 @@ class TestPowerSpectralDensityWithFiles(unittest.TestCase):
         os.mkdir(self.dir)
         self.asd_file = os.path.join(os.path.dirname(__file__), 'noise_curves', 'asd_test_file.txt')
         self.psd_file = os.path.join(os.path.dirname(__file__), 'noise_curves', 'psd_test_file.txt')
-        with open(self.asd_file, "x") as f:
+        with open(self.asd_file, 'w') as f:
             f.write('1.\t1.0e-21\n2.\t2.0e-21\n3.\t3.0e-21')
-        with open(self.psd_file, "x") as f:
+        with open(self.psd_file, 'w') as f:
             f.write('1.\t1.0e-42\n2.\t4.0e-42\n3.\t9.0e-42')
         self.frequency_array = np.array([1.0, 2.0, 3.0])
         self.asd_array = np.array([1.0e-21, 2.0e-21, 3.0e-21])
-- 
GitLab