Skip to content

Commit

Permalink
added new test case
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav274 committed Feb 22, 2021
1 parent dc690c4 commit 20a0095
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/models/storage/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,6 @@ def __add__(self, other: 'Batch'):
Batch
"""

def _unique_keys(dict1, dict2):
return set(list(dict1.keys()) + list(dict2.keys()))

if not isinstance(other, Batch):
raise TypeError("Input should be of type Batch")

Expand Down
14 changes: 14 additions & 0 deletions test/models/catalog/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# coding=utf-8
# Copyright 2018-2020 EVA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
26 changes: 26 additions & 0 deletions test/models/catalog/test_frame_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# coding=utf-8
# Copyright 2018-2020 EVA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import unittest

from src.models.catalog.frame_info import FrameInfo
from src.models.catalog.properties import ColorSpace


class FrameInfoTest(unittest.TestCase):

def test_frame_info_equality(self):
info1 = FrameInfo(250, 250, 3, ColorSpace.GRAY)
info2 = FrameInfo(250, 250, color_space=ColorSpace.GRAY)
self.assertEqual(info1, info2)

0 comments on commit 20a0095

Please sign in to comment.