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. ...@@ -26,7 +26,6 @@ Packaged with conda.
import argparse import argparse
import struct import struct
import sys import sys
from io import open
from os.path import basename, getsize, isfile from os.path import basename, getsize, isfile
PROG_VERSION = '2020.216' PROG_VERSION = '2020.216'
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"""The setup script.""" """The setup script."""
from io import open
from setuptools import setup, find_packages from setuptools import setup, find_packages
with open('README.rst', 'rt') as readme_file: with open('README.rst', 'rt') as readme_file:
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
"""Tests for `refscrub` package.""" """Tests for `refscrub` package."""
import argparse import argparse
import io
import os import os
import unittest import unittest
...@@ -42,8 +41,8 @@ class TestRefscrub(unittest.TestCase): ...@@ -42,8 +41,8 @@ class TestRefscrub(unittest.TestCase):
main() main()
self.assertTrue(os.path.isfile('scrubsum.txt'), "Error! Summary file " self.assertTrue(os.path.isfile('scrubsum.txt'), "Error! Summary file "
"not created.") "not created.")
with io.open("scrubsum.txt", "rt") as f_out: with open("scrubsum.txt", "rt") as f_out:
out = f_out.readlines() 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() test = f_test.readlines()
self.assertEqual(out, test) 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