Skip to content

Commit

Permalink
Merge pull request #80 from kaklise/release
Browse files Browse the repository at this point in the history
Relaxed dtype check in tests
  • Loading branch information
kaklise authored Oct 27, 2023
2 parents e0aea99 + c971148 commit c9cdd46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pecos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pecos import utils
from pecos import pv

__version__ = '0.3.0'
__version__ = '0.3.1'

__copyright__ = """Copyright 2016 National Technology & Engineering
Solutions of Sandia, LLC (NTESS). Under the terms of Contract
Expand Down
16 changes: 8 additions & 8 deletions pecos/tests/test_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def test_check_exact_times_true(self):
columns=['Variable Name', 'Start Time', 'End Time', 'Timesteps', 'Error Flag'],
index=pd.RangeIndex(start=0, stop=1, step=1)
)
assert_frame_equal(expected, self.pm.test_results)
assert_frame_equal(expected, self.pm.test_results, check_dtype=False)

def test_check_exact_times_false(self):
self.pm.check_timestamp(3600, exact_times=False)
Expand All @@ -358,7 +358,7 @@ def test_check_exact_times_false(self):
columns=['Variable Name', 'Start Time', 'End Time', 'Timesteps', 'Error Flag'],
index=pd.RangeIndex(start=0, stop=1, step=1)
)
assert_frame_equal(expected, self.pm.test_results)
assert_frame_equal(expected, self.pm.test_results, check_dtype=False)

def test_check_exact_times_true_with_start_time(self):
self.pm.check_timestamp(3600, expected_start_time=pd.Timestamp('2016-10-17 01:00:00'),
Expand All @@ -370,7 +370,7 @@ def test_check_exact_times_true_with_start_time(self):
columns=['Variable Name', 'Start Time', 'End Time', 'Timesteps', 'Error Flag'],
index=pd.RangeIndex(start=0, stop=1, step=1)
)
assert_frame_equal(expected, self.pm.test_results)
assert_frame_equal(expected, self.pm.test_results, check_dtype=False)


class Test_check_delta(unittest.TestCase):
Expand Down Expand Up @@ -401,7 +401,7 @@ def test_deadsensor(self):
index=pd.RangeIndex(start=0, stop=2, step=1)
)
#pecos.graphics.plot_test_results(self.pm.df, self.pm.test_results, filename_root='test_deadsensor')
assert_frame_equal(expected, self.pm.test_results)
assert_frame_equal(expected, self.pm.test_results, check_dtype=False)

def test_increment_deadsensor(self):
# As expected, check_increment does not produce the same results as check_delta
Expand All @@ -418,7 +418,7 @@ def test_abrupt_change(self):
columns=['Variable Name', 'Start Time', 'End Time', 'Timesteps', 'Error Flag'],
index=pd.RangeIndex(start=0, stop=3, step=1)
)
assert_frame_equal(expected, self.pm.test_results)
assert_frame_equal(expected, self.pm.test_results, check_dtype=False)

def test_abrupt_positive_change(self):
# abrupt positive change = > 7 in 3 hours
Expand All @@ -429,7 +429,7 @@ def test_abrupt_positive_change(self):
columns=['Variable Name', 'Start Time', 'End Time', 'Timesteps', 'Error Flag'],
index=pd.RangeIndex(start=0, stop=2, step=1)
)
assert_frame_equal(expected, self.pm.test_results)
assert_frame_equal(expected, self.pm.test_results, check_dtype=False)

def test_abrupt_negative_change(self):
# abrupt negative change = < 7 in 3 hours
Expand All @@ -439,7 +439,7 @@ def test_abrupt_negative_change(self):
columns=['Variable Name', 'Start Time', 'End Time', 'Timesteps', 'Error Flag'],
index=pd.RangeIndex(start=0, stop=1, step=1)
)
assert_frame_equal(expected, self.pm.test_results)
assert_frame_equal(expected, self.pm.test_results, check_dtype=False)

def test_delta_scale(self, output=False):
# The following function was used to test scalability of the delta test
Expand Down Expand Up @@ -545,7 +545,7 @@ def test_outlier(self):
columns=['Variable Name', 'Start Time', 'End Time', 'Timesteps', 'Error Flag'],
index=pd.RangeIndex(start=0, stop=2, step=1)
)
assert_frame_equal(expected, self.pm.test_results)
assert_frame_equal(expected, self.pm.test_results, check_dtype=False)

# Functional tests
results = pecos.monitoring.check_outlier(self.pm.data, [None, 1.9], window=None, absolute_value=True )
Expand Down

0 comments on commit c9cdd46

Please sign in to comment.