diff --git a/docs/conf.py b/docs/conf.py index 3971c64f6a7c8b50ac5b1c4c892c2c8957e83fb9..6e27d97916ea9e851ebd5c9189f1a03534a6cfaa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -47,9 +47,9 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'refscrub' -copyright = u"2018, IRIS PASSCAL" -author = u"IRIS PASSCAL" +project = 'refscrub' +copyright = "2018, IRIS PASSCAL" +author = "IRIS PASSCAL" # The version info for the project you're documenting, acts as replacement # for |version| and |release|, also used in various other places throughout @@ -129,8 +129,8 @@ latex_elements = { # [howto, manual, or own class]). latex_documents = [ (master_doc, 'refscrub.tex', - u'refscrub Documentation', - u'IRIS PASSCAL', 'manual'), + 'refscrub Documentation', + 'IRIS PASSCAL', 'manual'), ] @@ -140,7 +140,7 @@ latex_documents = [ # (source start file, name, description, authors, manual section). man_pages = [ (master_doc, 'refscrub', - u'refscrub Documentation', + 'refscrub Documentation', [author], 1) ] @@ -152,7 +152,7 @@ man_pages = [ # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'refscrub', - u'refscrub Documentation', + 'refscrub Documentation', author, 'refscrub', 'One line description of project.', diff --git a/refscrub/refscrub.py b/refscrub/refscrub.py index ae66381824d1118f8bea58d5b22d881dc4375399..ff6f3014fd83c0d11a258d0647cceef5bf899259 100644 --- a/refscrub/refscrub.py +++ b/refscrub/refscrub.py @@ -14,7 +14,6 @@ Updates to work on both Python 2 & 3. Code cleanup to match PEP 8. Cleanup global vars. """ -from __future__ import (print_function, with_statement) from os.path import join, basename, getsize import sys import struct @@ -63,12 +62,12 @@ class SNseen(dict): ret.look(year, day, hour) def close_fhs(self): - for sn in self.values(): + for sn in list(self.values()): sn.close_fh() def __str__(self): s = " SN: YR:DAY:HR -- YR:DAY:HR : %12s\n" % 'Good Packets' - for sn in self.values(): + for sn in list(self.values()): s += str(sn) return s diff --git a/setup.py b/setup.py index 288cc8fc627f0e09fb47381efc903de58d87ed87..1dbc630f0fd2fbd36748db864703f0472bac75f1 100644 --- a/setup.py +++ b/setup.py @@ -5,10 +5,10 @@ from setuptools import setup, find_packages -with open('README.rst') as readme_file: +with open('README.rst', 'rt') as readme_file: readme = readme_file.read() -with open('HISTORY.rst') as history_file: +with open('HISTORY.rst', 'rt') as history_file: history = history_file.read() @@ -21,6 +21,8 @@ setup( 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'Natural Language :: English', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', ], description="Remove select packets from RT130 data", entry_points={ diff --git a/tests/test_refscrub.py b/tests/test_refscrub.py index 6af0b2dc456bbf8658c58d60118d4d3fa777b326..56529bb82f365b4239220491f8367b26e92d322d 100644 --- a/tests/test_refscrub.py +++ b/tests/test_refscrub.py @@ -21,8 +21,4 @@ class TestRefscrub(unittest.TestCase): """Tear down test fixtures, if any.""" def test_import(self): - if 'refscrub' in sys.modules: - self.assert_(True, "refscrub loaded") - else: - self.fail() - + self.assertTrue('refscrub' in sys.modules, "Refscrub import failed!")