def test_mixture_and_test_split(self):
        """Test loading a dataset mixture with test split."""
        dataset_configs = [
            DatasetConfig(
                id=self.dataset_name, config=self.dataset_config, split="train[:10]", columns=None, weight=None
            ),
        ]
        dataset_mixture = DatasetMixtureConfig(datasets=dataset_configs, test_split_size=0.2)
        args = ScriptArguments(dataset_name=None, dataset_mixture=asdict(dataset_mixture))
        dataset = get_dataset(args)
        self.assertIsInstance(dataset, DatasetDict)
        self.assertIn("train", dataset)
        self.assertIn("test", dataset)
        self.assertEqual(len(dataset["train"]), 8)
        self.assertEqual(len(dataset["test"]), 2)
Test loading a dataset mixture with test split.
tests/utils/test_data.py