Skip to content

Commit

Permalink
added changes for /s support
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolas committed Jan 3, 2020
1 parent 768ec04 commit c451d56
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.2
2.0.3
2 changes: 1 addition & 1 deletion plugnpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""plugnpy - A Simple Python Library for creating Opsview Opspack plugins"""

__version__ = '2.0.2'
__version__ = '2.0.3'
__program_name__ = 'plugnpy'

from .check import Check
Expand Down
12 changes: 12 additions & 0 deletions test/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,15 @@ def test_final_with_obj(capsys):
os.linesep
)
)

def test_final_per_second_UOM(capsys):
check = Check()
check.add_metric('Outbound Objects', 100, 'per_second', '50', '150', summary_precision=0, perf_data_precision=0)
with pytest.raises(SystemExit) as e:
check.final()
assert e.value.code == 1
assert capsys.readouterr().out == (
"METRIC WARNING - Outbound Objects is 100/s | 'Outbound Objects'=100per_second;50;150{0}".format(
os.linesep
)
)

0 comments on commit c451d56

Please sign in to comment.