Пример #1
0
    def __check(self, num, denom, expected):
        stream = mock.Mock(spec=GstPbutils.DiscovererVideoInfo)
        fraction = mock.Mock(num=num, denom=denom)

        stream.get_framerate_num = mock.Mock(return_value=num)
        stream.get_framerate_denom = mock.Mock(return_value=denom)

        self.assertEqual(format_framerate_value(stream), expected)
        self.assertEqual(format_framerate_value(fraction), expected)
Пример #2
0
    def __check(self, num, denom, expected):
        stream = Mock(spec=GstPbutils.DiscovererVideoInfo)
        fraction = Mock(num=num, denom=denom)

        stream.get_framerate_num = Mock(return_value=num)
        stream.get_framerate_denom = Mock(return_value=denom)

        self.assertEqual(format_framerate_value(stream), expected)
        self.assertEqual(format_framerate_value(fraction), expected)