diff --git a/tests/file_io_indexed_gzip_writer_test.py b/tests/file_io_indexed_gzip_writer_test.py index 84379b1..7e130a8 100755 --- a/tests/file_io_indexed_gzip_writer_test.py +++ b/tests/file_io_indexed_gzip_writer_test.py @@ -30,7 +30,14 @@ def setUp(self): def tearDown(self): """ """ self.Writer.close() - os.remove(os.path.abspath(os.path.join(".", "tests", "data", "unittest.mzml"))) + try: + os.remove(os.path.abspath(os.path.join(".", "tests", "data", "unittest.mzml"))) + except FileNotFoundError: + pass + try: + os.remove(os.path.abspath(os.path.join(".", "tests", "data", "unittest2.mzml"))) + except FileNotFoundError: + pass def test_init(self): self.assertEqual(self.Writer.crc32, 0) @@ -128,7 +135,9 @@ def test_add_data(self): "uncompressed", "CF_07062012_pH8_2_3A.mzML", ) - self.Writer = GSGW(test_file, max_idx=80, max_idx_len=8, max_offset_len=8) + self.Writer = GSGW(test_file, max_idx=80, max_idx_len=8, max_offset_len=8, output_path=os.path.abspath( + os.path.join(".", "tests", "data", "unittest2.mzml") + )) self.Writer.add_data(test_string, "a") self.Writer.close() file = open(self.paths[0], "rb")