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, 'pytest.mark.parametrize', 'pytest.mark.parametrize', False, 'import pytest\n'), (503, 'src.selections.selections', 'selections.selections', False, 'from src import selections\n')]