From b9876aaa1f15cc1a8022595156f5fabc8eff0482 Mon Sep 17 00:00:00 2001 From: jklenzing Date: Wed, 2 Nov 2022 16:17:56 -0400 Subject: [PATCH 1/2] STY: pytest syntax --- pysatMissions/tests/test_deprecation.py | 4 ++-- pysatMissions/tests/test_inst_methods_orbits.py | 4 ++-- pysatMissions/tests/test_methods_magcoord.py | 4 ++-- pysatMissions/tests/test_methods_spacecraft.py | 4 ++-- pysatMissions/tests/test_utils.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pysatMissions/tests/test_deprecation.py b/pysatMissions/tests/test_deprecation.py index 709a6397..7b2fac8f 100644 --- a/pysatMissions/tests/test_deprecation.py +++ b/pysatMissions/tests/test_deprecation.py @@ -9,13 +9,13 @@ class TestDeprecation(object): """Unit tests for deprecations.""" - def setup(self): + def setup_method(self): """Create a clean testing setup before each method.""" warnings.simplefilter("always", DeprecationWarning) return - def teardown(self): + def teardown_method(self): """Clean up test environment after each method.""" return diff --git a/pysatMissions/tests/test_inst_methods_orbits.py b/pysatMissions/tests/test_inst_methods_orbits.py index 0a08e2ce..d8ffe46c 100644 --- a/pysatMissions/tests/test_inst_methods_orbits.py +++ b/pysatMissions/tests/test_inst_methods_orbits.py @@ -8,7 +8,7 @@ class TestBasics(object): """Unit tests for conversion to/from Keplerian elements.""" - def setup(self): + def setup_method(self): """Create a clean testing setup before each method.""" self.orbit = {'inclination': 13, 'apogee': 850, 'perigee': 400, @@ -16,7 +16,7 @@ def setup(self): 'mean_motion': 0.0647333316545142} return - def teardown(self): + def teardown_method(self): """Clean up test environment after each method.""" del self.orbit diff --git a/pysatMissions/tests/test_methods_magcoord.py b/pysatMissions/tests/test_methods_magcoord.py index 08d7e0fc..183cb351 100644 --- a/pysatMissions/tests/test_methods_magcoord.py +++ b/pysatMissions/tests/test_methods_magcoord.py @@ -14,7 +14,7 @@ class TestBasics(object): """Main testing class for aacgmv2.""" - def setup(self): + def setup_method(self): """Create a clean testing setup before each method.""" self.test_inst = pysat.Instrument(platform='pysat', name='testing', @@ -26,7 +26,7 @@ def setup(self): self.reftime = dt.datetime(2009, 1, 1) return - def teardown(self): + def teardown_method(self): """Clean up test environment after each method.""" del self.test_inst, self.kwargs, self.reftime diff --git a/pysatMissions/tests/test_methods_spacecraft.py b/pysatMissions/tests/test_methods_spacecraft.py index 4cc7f01a..2e5452ba 100644 --- a/pysatMissions/tests/test_methods_spacecraft.py +++ b/pysatMissions/tests/test_methods_spacecraft.py @@ -35,7 +35,7 @@ def add_fake_data(inst): class TestBasics(object): """Unit tests for aacgmv2 methods.""" - def setup(self): + def setup_method(self): """Create a clean testing setup before each method.""" self.testInst = pysat.Instrument(platform='pysat', name='testing', @@ -45,7 +45,7 @@ def setup(self): self.reftime = dt.datetime(2009, 1, 1) return - def teardown(self): + def teardown_method(self): """Clean up test environment after tests.""" del self.testInst, self.reftime diff --git a/pysatMissions/tests/test_utils.py b/pysatMissions/tests/test_utils.py index c1f3cc23..c3b45fdd 100644 --- a/pysatMissions/tests/test_utils.py +++ b/pysatMissions/tests/test_utils.py @@ -11,13 +11,13 @@ class TestBasics(object): """Basic test for package utilities.""" - def setup(self): + def setup_method(self): """Create a clean testing setup before each method.""" warnings.simplefilter("always") return - def teardown(self): + def teardown_method(self): """Clean up test environment after tests.""" return From 5c3e3a4f65bb6c1f496d7b232388e0e67e697e0e Mon Sep 17 00:00:00 2001 From: jklenzing Date: Wed, 2 Nov 2022 16:19:21 -0400 Subject: [PATCH 2/2] DOC: update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2760932a..9e6cc02c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). +## [0.X.X] - 2022-XX-XX +* Maintenance + * Update pytest syntax + ## [0.3.3] - 2022-09-06 * Documentation Updates