Skip to content

Commit

Permalink
add codecov config, add test for version parsing, mode module docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshKarpel committed Oct 18, 2019
1 parent 991c467 commit 554cbc3
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .codecov.yml
@@ -0,0 +1,7 @@
coverage:
range: 50..90
round: down
precision: 0

comment:
layout: "diff, files"
7 changes: 7 additions & 0 deletions idesolver/__init__.py
@@ -1,3 +1,10 @@
"""
A general purpose integro-differential equation (IDE) solver.
Copyright (C) 2017-2019 Joshua T Karpel
Full license available at github.com/JoshKarpel/LICENSE
"""

from .idesolver import *
from .exceptions import *
from .version import __version__, version_info
7 changes: 0 additions & 7 deletions idesolver/idesolver.py
@@ -1,10 +1,3 @@
"""
A general purpose integro-differential equation (IDE) solver.
Copyright (C) 2017-2019 Joshua T Karpel
Full license available at github.com/JoshKarpel/LICENSE
"""

from typing import Union, Optional, Callable
import warnings
import logging
Expand Down
18 changes: 18 additions & 0 deletions tests/test_version.py
@@ -0,0 +1,18 @@
import pytest

from idesolver.version import _version_info

@pytest.mark.parametrize(
'version, expected',
[
('0.1.0', (0, 1, 0, None, None)),
('0.1.0a5', (0, 1, 0, 'a', 5)),
('2.4.3', (2, 4, 3, None, None)),
('2.4.3b3', (2, 4, 3, 'b', 3)),
('12.44.33', (12, 44, 33, None, None)),
('12.44.33b99', (12, 44, 33, 'b', 99)),
('12.44.33post1', (12, 44, 33, 'post', 1)),
]
)
def test_version_info(version, expected):
assert _version_info(version) == expected

0 comments on commit 554cbc3

Please sign in to comment.