Skip to content

Commit

Permalink
test: add a simple test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl committed Feb 29, 2024
1 parent 752fac6 commit bb0c976
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ruff: ## Run ruff checks over the source code
.PHONY: ruff

mypy: ## Run mypy checks over the source code
$(PYTHON) -m mypy src
$(PYTHON) -m mypy src test
@echo -e "\e[1;32mmypy (strict) clean!\e[0m"
.PHONY: mypy

Expand All @@ -50,7 +50,7 @@ codespell: ## Run codespell checks over the documentation
--skip _build \
--uri-ignore-words-list '*' \
--ignore-words .codespell-ignore \
src test
src test docs
@echo -e "\e[1;32mcodespell clean!\e[0m"
.PHONY: codespell

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023 Alexandru Fikl <alexfikl@gmail.com>
# SPDX-FileCopyrightText: 2024 Alexandru Fikl <alexfikl@gmail.com>
# SPDX-License-Identifier: MIT

from setuptools import setup
Expand Down
2 changes: 1 addition & 1 deletion src/papis_abbrev/command.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023 Alexandru Fikl <alexfikl@gmail.com>
# SPDX-FileCopyrightText: 2024 Alexandru Fikl <alexfikl@gmail.com>
# SPDX-License-Identifier: MIT

from __future__ import annotations
Expand Down
14 changes: 14 additions & 0 deletions test/test_abbrev.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-FileCopyrightText: 2024 Alexandru Fikl <alexfikl@gmail.com>
# SPDX-License-Identifier: MIT

from __future__ import annotations

import pytest


def test_pyiso4() -> None:
ltwa = pytest.importorskip("pyiso4.ltwa")

abbrev = ltwa.Abbreviate.create()
result = abbrev("Journal of Computational Physics", remove_part=True)
assert result == "J. Comput. Phys."

0 comments on commit bb0c976

Please sign in to comment.