コード例 #1
0
    def test_dataset_from_datasets_with_different_sizes(self):
        datasets = [
            DataSet({1}, 4),
            DataSet({2, 3}, 8),
        ]

        result = dataset_from_datasets(datasets)

        self.assertSetEqual(result.data, {1, 2, 3})
        self.assertEqual(result._bits, UNKNOWN_SIZE)
コード例 #2
0
    def test_dataset_from_datasets(self):
        datasets = [
            DataSet({1}, 4),
            DataSet({2, 3}, 4),
        ]

        result = dataset_from_datasets(datasets)

        self.assertSetEqual(result.data, {1, 2, 3})
        self.assertEqual(result._bits, 4)
コード例 #3
0
    def test_dataset_from_datasets_with_empty_list_of_datasets(self):
        datasets = []
        result = dataset_from_datasets(datasets)

        self.assertSetEqual(result.data, {UNDEFINED})
        self.assertEqual(result._bits, UNKNOWN_SIZE)