Skip to content
Snippets Groups Projects
Commit 85d7e7d2 authored by Maeva Pourpoint's avatar Maeva Pourpoint
Browse files

Use open() instead of io.open()

parent b33fead2
No related branches found
No related tags found
1 merge request!3Update code to run under Python3 + Conda packaging
Pipeline #806 passed with stage
in 38 seconds
......@@ -26,7 +26,6 @@ Packaged with conda.
import argparse
import struct
import sys
from io import open
from os.path import basename, getsize, isfile
PROG_VERSION = '2020.216'
......
......@@ -3,7 +3,6 @@
"""The setup script."""
from io import open
from setuptools import setup, find_packages
with open('README.rst', 'rt') as readme_file:
......
......@@ -4,7 +4,6 @@
"""Tests for `refscrub` package."""
import argparse
import io
import os
import unittest
......@@ -42,8 +41,8 @@ class TestRefscrub(unittest.TestCase):
main()
self.assertTrue(os.path.isfile('scrubsum.txt'), "Error! Summary file "
"not created.")
with io.open("scrubsum.txt", "rt") as f_out:
with open("scrubsum.txt", "rt") as f_out:
out = f_out.readlines()
with io.open(TEST_SUMMARY, "rt") as f_test:
with open(TEST_SUMMARY, "rt") as f_test:
test = f_test.readlines()
self.assertEqual(out, test)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment