import typing

import pytest
from src import selections


@pytest.mark.parametrize(
    'min_time, min_bytes, expected_result',
    [
        (
            10 * 60 * 1000,
            500 * 1024 * 1024,
            [
                (2820,),
                (2827,),
                (2832,),
                (2834,),
                (2842,),
                (2844,),
                (2851,),
                (2852,),
                (2859,),
                (2862,),
                (2872,),
                (2878,),
                (2881,),
                (2890,),
                (2897,),
                (2899,),
                (2902,),
                (2903,),
                (2907,),
                (2910,),
                (2918,),
                (2920,),
                (3166,),
                (3167,),
                (3224,),
                (3226,),
                (3228,),
                (3229,),
                (3230,),
                (3231,),
                (3233,),
                (3234,),
                (3235,),
                (3236,),
                (3239,),
                (3242,),
                (3243,),
                (3244,),
                (3245,),
                (3246,),
                (3247,),
                (3249,),
                (3251,),
                (3338,),
            ],
        ),
        (
            5 * 60 * 1000,
            50 * 1024 * 1024,
            [
                (1666,),
                (2819,),
                (2820,),
                (2821,),
                (2822,),
                (2823,),
                (2824,),
                (2825,),
                (2826,),
                (2827,),
                (2828,),
                (2829,),
                (2830,),
                (2831,),
                (2832,),
                (2833,),
                (2834,),
                (2835,),
                (2836,),
                (2837,),
                (2838,),
                (2839,),
                (2840,),
                (2841,),
                (2842,),
                (2843,),
                (2844,),
                (2845,),
                (2846,),
                (2847,),
                (2848,),
                (2849,),
                (2850,),
                (2851,),
                (2852,),
                (2853,),
                (2854,),
                (2855,),
                (2856,),
                (2857,),
                (2858,),
                (2859,),
                (2860,),
                (2861,),
                (2862,),
                (2863,),
                (2864,),
                (2865,),
                (2866,),
                (2867,),
                (2868,),
                (2869,),
                (2870,),
                (2871,),
                (2872,),
                (2873,),
                (2874,),
                (2875,),
                (2876,),
                (2877,),
                (2878,),
                (2879,),
                (2880,),
                (2881,),
                (2882,),
                (2883,),
                (2884,),
                (2885,),
                (2886,),
                (2887,),
                (2888,),
                (2889,),
                (2890,),
                (2891,),
                (2892,),
                (2893,),
                (2894,),
                (2895,),
                (2896,),
                (2897,),
                (2898,),
                (2899,),
                (2900,),
                (2901,),
                (2902,),
                (2903,),
                (2904,),
                (2905,),
                (2906,),
                (2907,),
                (2908,),
                (2909,),
                (2910,),
                (2911,),
                (2912,),
                (2913,),
                (2914,),
                (2915,),
                (2916,),
                (2917,),
                (2918,),
                (2919,),
                (2920,),
                (2921,),
                (2922,),
                (2923,),
                (2924,),
                (2925,),
                (3165,),
                (3166,),
                (3167,),
                (3168,),
                (3169,),
                (3170,),
                (3171,),
                (3172,),
                (3173,),
                (3174,),
                (3175,),
                (3176,),
                (3177,),
                (3178,),
                (3179,),
                (3180,),
                (3181,),
                (3182,),
                (3183,),
                (3184,),
                (3185,),
                (3186,),
                (3187,),
                (3188,),
                (3189,),
                (3190,),
                (3191,),
                (3192,),
                (3193,),
                (3194,),
                (3195,),
                (3196,),
                (3197,),
                (3198,),
                (3199,),
                (3200,),
                (3201,),
                (3202,),
                (3203,),
                (3204,),
                (3205,),
                (3206,),
                (3207,),
                (3208,),
                (3209,),
                (3210,),
                (3211,),
                (3212,),
                (3213,),
                (3214,),
                (3215,),
                (3216,),
                (3217,),
                (3218,),
                (3219,),
                (3220,),
                (3221,),
                (3222,),
                (3223,),
                (3224,),
                (3226,),
                (3227,),
                (3228,),
                (3229,),
                (3230,),
                (3231,),
                (3232,),
                (3233,),
                (3234,),
                (3235,),
                (3236,),
                (3237,),
                (3238,),
                (3239,),
                (3240,),
                (3241,),
                (3242,),
                (3243,),
                (3244,),
                (3245,),
                (3246,),
                (3247,),
                (3248,),
                (3249,),
                (3250,),
                (3251,),
                (3252,),
                (3337,),
                (3338,),
                (3340,),
                (3341,),
                (3342,),
                (3343,),
                (3344,),
                (3345,),
                (3346,),
                (3347,),
                (3348,),
                (3360,),
                (3361,),
                (3362,),
                (3363,),
                (3364,),
                (3428,),
                (3429,),
            ],
        ),
        (
            2 * 60 * 1000,
            100 * 1024 * 1024,
            [
                (2819,),
                (2820,),
                (2821,),
                (2822,),
                (2823,),
                (2824,),
                (2825,),
                (2826,),
                (2827,),
                (2828,),
                (2829,),
                (2830,),
                (2831,),
                (2832,),
                (2833,),
                (2834,),
                (2835,),
                (2836,),
                (2837,),
                (2838,),
                (2839,),
                (2840,),
                (2841,),
                (2842,),
                (2843,),
                (2844,),
                (2845,),
                (2846,),
                (2847,),
                (2848,),
                (2849,),
                (2850,),
                (2851,),
                (2852,),
                (2853,),
                (2854,),
                (2855,),
                (2856,),
                (2857,),
                (2858,),
                (2859,),
                (2860,),
                (2861,),
                (2862,),
                (2863,),
                (2864,),
                (2865,),
                (2866,),
                (2867,),
                (2868,),
                (2869,),
                (2870,),
                (2871,),
                (2872,),
                (2873,),
                (2874,),
                (2875,),
                (2876,),
                (2877,),
                (2878,),
                (2879,),
                (2880,),
                (2881,),
                (2882,),
                (2883,),
                (2884,),
                (2885,),
                (2886,),
                (2887,),
                (2888,),
                (2889,),
                (2890,),
                (2891,),
                (2892,),
                (2893,),
                (2894,),
                (2895,),
                (2896,),
                (2897,),
                (2898,),
                (2899,),
                (2900,),
                (2901,),
                (2902,),
                (2903,),
                (2904,),
                (2905,),
                (2906,),
                (2907,),
                (2908,),
                (2909,),
                (2910,),
                (2911,),
                (2912,),
                (2913,),
                (2914,),
                (2915,),
                (2916,),
                (2917,),
                (2918,),
                (2919,),
                (2920,),
                (2921,),
                (2922,),
                (2923,),
                (2924,),
                (2925,),
                (3165,),
                (3166,),
                (3167,),
                (3168,),
                (3169,),
                (3170,),
                (3171,),
                (3172,),
                (3173,),
                (3174,),
                (3175,),
                (3176,),
                (3177,),
                (3178,),
                (3179,),
                (3180,),
                (3181,),
                (3182,),
                (3183,),
                (3184,),
                (3185,),
                (3186,),
                (3187,),
                (3188,),
                (3189,),
                (3190,),
                (3191,),
                (3192,),
                (3193,),
                (3194,),
                (3195,),
                (3196,),
                (3197,),
                (3198,),
                (3199,),
                (3200,),
                (3201,),
                (3202,),
                (3203,),
                (3204,),
                (3205,),
                (3206,),
                (3207,),
                (3208,),
                (3209,),
                (3210,),
                (3211,),
                (3212,),
                (3213,),
                (3214,),
                (3215,),
                (3216,),
                (3217,),
                (3218,),
                (3219,),
                (3220,),
                (3221,),
                (3222,),
                (3223,),
                (3224,),
                (3226,),
                (3227,),
                (3228,),
                (3229,),
                (3230,),
                (3231,),
                (3232,),
                (3233,),
                (3234,),
                (3235,),
                (3236,),
                (3237,),
                (3238,),
                (3239,),
                (3240,),
                (3241,),
                (3242,),
                (3243,),
                (3244,),
                (3245,),
                (3246,),
                (3247,),
                (3248,),
                (3249,),
                (3250,),
                (3251,),
                (3252,),
                (3337,),
                (3338,),
                (3341,),
                (3342,),
                (3343,),
                (3344,),
                (3345,),
                (3346,),
                (3347,),
                (3348,),
                (3360,),
                (3361,),
                (3362,),
                (3363,),
                (3364,),
                (3428,),
                (3429,),
            ],
        ),
    ],
)
def test_selections(
    min_time: int,
    min_bytes: int,
    expected_result: typing.List[typing.Tuple[int]],
) -> None:
    code_returned_rows = [tuple(row) for row in selections.selections(min_time, min_bytes)]
    assert code_returned_rows == expected_result

[((7, 1, 497, 1), 'pytest.mark.parametrize', 'pytest.mark.parametrize', ({(8, 4, 8, 42): '"""min_time, min_bytes, expected_result"""', (9, 4, 496, 5): '[(10 * 60 * 1000, 500 * 1024 * 1024, [(2820,), (2827,), (2832,), (2834,), (\n    2842,), (2844,), (2851,), (2852,), (2859,), (2862,), (2872,), (2878,),\n    (2881,), (2890,), (2897,), (2899,), (2902,), (2903,), (2907,), (2910,),\n    (2918,), (2920,), (3166,), (3167,), (3224,), (3226,), (3228,), (3229,),\n    (3230,), (3231,), (3233,), (3234,), (3235,), (3236,), (3239,), (3242,),\n    (3243,), (3244,), (3245,), (3246,), (3247,), (3249,), (3251,), (3338,)]\n    ), (5 * 60 * 1000, 50 * 1024 * 1024, [(1666,), (2819,), (2820,), (2821,\n    ), (2822,), (2823,), (2824,), (2825,), (2826,), (2827,), (2828,), (2829\n    ,), (2830,), (2831,), (2832,), (2833,), (2834,), (2835,), (2836,), (\n    2837,), (2838,), (2839,), (2840,), (2841,), (2842,), (2843,), (2844,),\n    (2845,), (2846,), (2847,), (2848,), (2849,), (2850,), (2851,), (2852,),\n    (2853,), (2854,), (2855,), (2856,), (2857,), (2858,), (2859,), (2860,),\n    (2861,), (2862,), (2863,), (2864,), (2865,), (2866,), (2867,), (2868,),\n    (2869,), (2870,), (2871,), (2872,), (2873,), (2874,), (2875,), (2876,),\n    (2877,), (2878,), (2879,), (2880,), (2881,), (2882,), (2883,), (2884,),\n    (2885,), (2886,), (2887,), (2888,), (2889,), (2890,), (2891,), (2892,),\n    (2893,), (2894,), (2895,), (2896,), (2897,), (2898,), (2899,), (2900,),\n    (2901,), (2902,), (2903,), (2904,), (2905,), (2906,), (2907,), (2908,),\n    (2909,), (2910,), (2911,), (2912,), (2913,), (2914,), (2915,), (2916,),\n    (2917,), (2918,), (2919,), (2920,), (2921,), (2922,), (2923,), (2924,),\n    (2925,), (3165,), (3166,), (3167,), (3168,), (3169,), (3170,), (3171,),\n    (3172,), (3173,), (3174,), (3175,), (3176,), (3177,), (3178,), (3179,),\n    (3180,), (3181,), (3182,), (3183,), (3184,), (3185,), (3186,), (3187,),\n    (3188,), (3189,), (3190,), (3191,), (3192,), (3193,), (3194,), (3195,),\n    (3196,), (3197,), (3198,), (3199,), (3200,), (3201,), (3202,), (3203,),\n    (3204,), (3205,), (3206,), (3207,), (3208,), (3209,), (3210,), (3211,),\n    (3212,), (3213,), (3214,), (3215,), (3216,), (3217,), (3218,), (3219,),\n    (3220,), (3221,), (3222,), (3223,), (3224,), (3226,), (3227,), (3228,),\n    (3229,), (3230,), (3231,), (3232,), (3233,), (3234,), (3235,), (3236,),\n    (3237,), (3238,), (3239,), (3240,), (3241,), (3242,), (3243,), (3244,),\n    (3245,), (3246,), (3247,), (3248,), (3249,), (3250,), (3251,), (3252,),\n    (3337,), (3338,), (3340,), (3341,), (3342,), (3343,), (3344,), (3345,),\n    (3346,), (3347,), (3348,), (3360,), (3361,), (3362,), (3363,), (3364,),\n    (3428,), (3429,)]), (2 * 60 * 1000, 100 * 1024 * 1024, [(2819,), (2820,\n    ), (2821,), (2822,), (2823,), (2824,), (2825,), (2826,), (2827,), (2828\n    ,), (2829,), (2830,), (2831,), (2832,), (2833,), (2834,), (2835,), (\n    2836,), (2837,), (2838,), (2839,), (2840,), (2841,), (2842,), (2843,),\n    (2844,), (2845,), (2846,), (2847,), (2848,), (2849,), (2850,), (2851,),\n    (2852,), (2853,), (2854,), (2855,), (2856,), (2857,), (2858,), (2859,),\n    (2860,), (2861,), (2862,), (2863,), (2864,), (2865,), (2866,), (2867,),\n    (2868,), (2869,), (2870,), (2871,), (2872,), (2873,), (2874,), (2875,),\n    (2876,), (2877,), (2878,), (2879,), (2880,), (2881,), (2882,), (2883,),\n    (2884,), (2885,), (2886,), (2887,), (2888,), (2889,), (2890,), (2891,),\n    (2892,), (2893,), (2894,), (2895,), (2896,), (2897,), (2898,), (2899,),\n    (2900,), (2901,), (2902,), (2903,), (2904,), (2905,), (2906,), (2907,),\n    (2908,), (2909,), (2910,), (2911,), (2912,), (2913,), (2914,), (2915,),\n    (2916,), (2917,), (2918,), (2919,), (2920,), (2921,), (2922,), (2923,),\n    (2924,), (2925,), (3165,), (3166,), (3167,), (3168,), (3169,), (3170,),\n    (3171,), (3172,), (3173,), (3174,), (3175,), (3176,), (3177,), (3178,),\n    (3179,), (3180,), (3181,), (3182,), (3183,), (3184,), (3185,), (3186,),\n    (3187,), (3188,), (3189,), (3190,), (3191,), (3192,), (3193,), (3194,),\n    (3195,), (3196,), (3197,), (3198,), (3199,), (3200,), (3201,), (3202,),\n    (3203,), (3204,), (3205,), (3206,), (3207,), (3208,), (3209,), (3210,),\n    (3211,), (3212,), (3213,), (3214,), (3215,), (3216,), (3217,), (3218,),\n    (3219,), (3220,), (3221,), (3222,), (3223,), (3224,), (3226,), (3227,),\n    (3228,), (3229,), (3230,), (3231,), (3232,), (3233,), (3234,), (3235,),\n    (3236,), (3237,), (3238,), (3239,), (3240,), (3241,), (3242,), (3243,),\n    (3244,), (3245,), (3246,), (3247,), (3248,), (3249,), (3250,), (3251,),\n    (3252,), (3337,), (3338,), (3341,), (3342,), (3343,), (3344,), (3345,),\n    (3346,), (3347,), (3348,), (3360,), (3361,), (3362,), (3363,), (3364,),\n    (3428,), (3429,)])]'}, {}), "('min_time, min_bytes, expected_result', [(10 * 60 *\n    1000, 500 * 1024 * 1024, [(2820,), (2827,), (2832,), (2834,), (2842,),\n    (2844,), (2851,), (2852,), (2859,), (2862,), (2872,), (2878,), (2881,),\n    (2890,), (2897,), (2899,), (2902,), (2903,), (2907,), (2910,), (2918,),\n    (2920,), (3166,), (3167,), (3224,), (3226,), (3228,), (3229,), (3230,),\n    (3231,), (3233,), (3234,), (3235,), (3236,), (3239,), (3242,), (3243,),\n    (3244,), (3245,), (3246,), (3247,), (3249,), (3251,), (3338,)]), (5 * \n    60 * 1000, 50 * 1024 * 1024, [(1666,), (2819,), (2820,), (2821,), (2822\n    ,), (2823,), (2824,), (2825,), (2826,), (2827,), (2828,), (2829,), (\n    2830,), (2831,), (2832,), (2833,), (2834,), (2835,), (2836,), (2837,),\n    (2838,), (2839,), (2840,), (2841,), (2842,), (2843,), (2844,), (2845,),\n    (2846,), (2847,), (2848,), (2849,), (2850,), (2851,), (2852,), (2853,),\n    (2854,), (2855,), (2856,), (2857,), (2858,), (2859,), (2860,), (2861,),\n    (2862,), (2863,), (2864,), (2865,), (2866,), (2867,), (2868,), (2869,),\n    (2870,), (2871,), (2872,), (2873,), (2874,), (2875,), (2876,), (2877,),\n    (2878,), (2879,), (2880,), (2881,), (2882,), (2883,), (2884,), (2885,),\n    (2886,), (2887,), (2888,), (2889,), (2890,), (2891,), (2892,), (2893,),\n    (2894,), (2895,), (2896,), (2897,), (2898,), (2899,), (2900,), (2901,),\n    (2902,), (2903,), (2904,), (2905,), (2906,), (2907,), (2908,), (2909,),\n    (2910,), (2911,), (2912,), (2913,), (2914,), (2915,), (2916,), (2917,),\n    (2918,), (2919,), (2920,), (2921,), (2922,), (2923,), (2924,), (2925,),\n    (3165,), (3166,), (3167,), (3168,), (3169,), (3170,), (3171,), (3172,),\n    (3173,), (3174,), (3175,), (3176,), (3177,), (3178,), (3179,), (3180,),\n    (3181,), (3182,), (3183,), (3184,), (3185,), (3186,), (3187,), (3188,),\n    (3189,), (3190,), (3191,), (3192,), (3193,), (3194,), (3195,), (3196,),\n    (3197,), (3198,), (3199,), (3200,), (3201,), (3202,), (3203,), (3204,),\n    (3205,), (3206,), (3207,), (3208,), (3209,), (3210,), (3211,), (3212,),\n    (3213,), (3214,), (3215,), (3216,), (3217,), (3218,), (3219,), (3220,),\n    (3221,), (3222,), (3223,), (3224,), (3226,), (3227,), (3228,), (3229,),\n    (3230,), (3231,), (3232,), (3233,), (3234,), (3235,), (3236,), (3237,),\n    (3238,), (3239,), (3240,), (3241,), (3242,), (3243,), (3244,), (3245,),\n    (3246,), (3247,), (3248,), (3249,), (3250,), (3251,), (3252,), (3337,),\n    (3338,), (3340,), (3341,), (3342,), (3343,), (3344,), (3345,), (3346,),\n    (3347,), (3348,), (3360,), (3361,), (3362,), (3363,), (3364,), (3428,),\n    (3429,)]), (2 * 60 * 1000, 100 * 1024 * 1024, [(2819,), (2820,), (2821,\n    ), (2822,), (2823,), (2824,), (2825,), (2826,), (2827,), (2828,), (2829\n    ,), (2830,), (2831,), (2832,), (2833,), (2834,), (2835,), (2836,), (\n    2837,), (2838,), (2839,), (2840,), (2841,), (2842,), (2843,), (2844,),\n    (2845,), (2846,), (2847,), (2848,), (2849,), (2850,), (2851,), (2852,),\n    (2853,), (2854,), (2855,), (2856,), (2857,), (2858,), (2859,), (2860,),\n    (2861,), (2862,), (2863,), (2864,), (2865,), (2866,), (2867,), (2868,),\n    (2869,), (2870,), (2871,), (2872,), (2873,), (2874,), (2875,), (2876,),\n    (2877,), (2878,), (2879,), (2880,), (2881,), (2882,), (2883,), (2884,),\n    (2885,), (2886,), (2887,), (2888,), (2889,), (2890,), (2891,), (2892,),\n    (2893,), (2894,), (2895,), (2896,), (2897,), (2898,), (2899,), (2900,),\n    (2901,), (2902,), (2903,), (2904,), (2905,), (2906,), (2907,), (2908,),\n    (2909,), (2910,), (2911,), (2912,), (2913,), (2914,), (2915,), (2916,),\n    (2917,), (2918,), (2919,), (2920,), (2921,), (2922,), (2923,), (2924,),\n    (2925,), (3165,), (3166,), (3167,), (3168,), (3169,), (3170,), (3171,),\n    (3172,), (3173,), (3174,), (3175,), (3176,), (3177,), (3178,), (3179,),\n    (3180,), (3181,), (3182,), (3183,), (3184,), (3185,), (3186,), (3187,),\n    (3188,), (3189,), (3190,), (3191,), (3192,), (3193,), (3194,), (3195,),\n    (3196,), (3197,), (3198,), (3199,), (3200,), (3201,), (3202,), (3203,),\n    (3204,), (3205,), (3206,), (3207,), (3208,), (3209,), (3210,), (3211,),\n    (3212,), (3213,), (3214,), (3215,), (3216,), (3217,), (3218,), (3219,),\n    (3220,), (3221,), (3222,), (3223,), (3224,), (3226,), (3227,), (3228,),\n    (3229,), (3230,), (3231,), (3232,), (3233,), (3234,), (3235,), (3236,),\n    (3237,), (3238,), (3239,), (3240,), (3241,), (3242,), (3243,), (3244,),\n    (3245,), (3246,), (3247,), (3248,), (3249,), (3250,), (3251,), (3252,),\n    (3337,), (3338,), (3341,), (3342,), (3343,), (3344,), (3345,), (3346,),\n    (3347,), (3348,), (3360,), (3361,), (3362,), (3363,), (3364,), (3428,),\n    (3429,)])])", False, 'import pytest\n'), ((503, 48, 503, 90), 'src.selections.selections', 'selections.selections', ({(503, 70, 503, 78): 'min_time', (503, 80, 503, 89): 'min_bytes'}, {}), '(min_time, min_bytes)', False, 'from src import selections\n')]