Skip to content

Commit

Permalink
misc adapt unit test for warning message fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mvesin committed May 16, 2023
1 parent c2a8ec7 commit 40e95bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ def test_versions_02_check_version_compatibility(self):
self.mock_versions_log.reset_mock()
raise_for_version_compatibility(Version('1.1.1'), Version('1.5.1'), 'v1 %s v2 %s')
self.assertEqual(self.mock_versions_log.warning.call_count, 1)
self.assertEqual(self.mock_versions_log.warning.call_args[0][0][:17], 'v1 1.1.1 v2 1.5.1')
self.assertEqual(self.mock_versions_log.warning.call_args[0][0][:17], 'Found version 1.1')

# Warning case: difference in minor version
# versions specified as str
self.mock_versions_log.reset_mock()
raise_for_version_compatibility('1.1.5', '1.5.1', 'v1 %s v2 %s')
self.assertEqual(self.mock_versions_log.warning.call_count, 1)
self.assertEqual(self.mock_versions_log.warning.call_args[0][0][:17], 'v1 1.1.5 v2 1.5.1')
self.assertEqual(self.mock_versions_log.warning.call_args[0][0][:17], 'Found version 1.1')

# Error case: the minor version in the static component file (e.g. config file) is higher
# than that of the runtime
Expand All @@ -100,7 +100,7 @@ def test_versions_02_check_version_compatibility(self):
self.mock_versions_log.reset_mock()
raise_for_version_compatibility(Version('1.1.2'), Version('1.1.5'), 'v1 %s v2 %s')
self.assertEqual(self.mock_versions_log.warning.call_count, 1)
self.assertEqual(self.mock_versions_log.warning.call_args[0][0][:17], 'v1 1.1.2 v2 1.1.5')
self.assertEqual(self.mock_versions_log.warning.call_args[0][0][:17], 'Found version 1.1')

# Error case: the micro version in the static component file (e.g. config file) is higher
# than that of the runtime
Expand Down

0 comments on commit 40e95bc

Please sign in to comment.