Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: pytest syntax #100

Merged
merged 2 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions pysatMissions/tests/test_deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions pysatMissions/tests/test_inst_methods_orbits.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
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,
'eccentricity': 0.032160315599897085,
'mean_motion': 0.0647333316545142}
return

def teardown(self):
def teardown_method(self):
"""Clean up test environment after each method."""

del self.orbit
Expand Down
4 changes: 2 additions & 2 deletions pysatMissions/tests/test_methods_magcoord.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pysatMissions/tests/test_methods_spacecraft.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pysatMissions/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down