Skip to content

Commit

Permalink
add test_version module
Browse files Browse the repository at this point in the history
  • Loading branch information
JessyBarrette committed Aug 20, 2024
1 parent 4a738a5 commit 664793e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ability to list multiple file glob expression and associated metadata.
- Rely on ruff for format and linter testing
- Add option to pass a list of input_path paths via the configuration file or a
os path seperator list via the command line interface or the configuration
- Add test to test version within package `__init__.py`, `CHANGELOG.md`, and `pyproject.tom`

### Fixed

Expand Down
16 changes: 16 additions & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from pathlib import Path
from ocean_data_parser import __version__
import toml


def test_pyproject():
"""Test the Python package version"""
pyproject = toml.loads(Path("pyproject.toml").read_text())
assert __version__ == pyproject["tool"]["poetry"]["version"]

def test_changelog_version():
"""Test the CHANGELOG version"""
changelog = Path("CHANGELOG.md").read_text()
assert f"## `{__version__}`" in changelog


0 comments on commit 664793e

Please sign in to comment.