"""
Problem 50: Consecutive prime sum
https://projecteuler.net/problem=50

The prime 41, can be written as the sum of six consecutive primes:

41 = 2 + 3 + 5 + 7 + 11 + 13
This is the longest sum of consecutive primes that adds to a prime below one-hundred.

The longest sum of consecutive primes below one-thousand that adds to a prime,
contains 21 terms, and is equal to 953.

Which prime, below one-million, can be written as the sum of the most consecutive primes?
"""

import pytest


@pytest.mark.parametrize('test_input_threshold,expected_result', [
    (100, 41),
    (1000, 953),
])
def test_get_longest_consecutive_prime_sum(test_input_threshold, expected_result):
    # arrange
    from src.p050_consecutive_prime_sum import get_longest_consecutive_prime_sum

    # act
    actual_result = get_longest_consecutive_prime_sum(test_input_threshold)

    # assert
    assert sum(actual_result) == expected_result

14841a7a1190b900691211f8d0571cf642933d17
<mask token>

<mask token>


@pytest.mark.parametrize('test_input_threshold,expected_result', [(100, 41),
    (1000, 953)])
def test_get_longest_consecutive_prime_sum(test_input_threshold,
    expected_result):
    from src.p050_consecutive_prime_sum import get_longest_consecutive_prime_sum
    actual_result = get_longest_consecutive_prime_sum(test_input_threshold)
    assert sum(actual_result) == expected_result

<mask token>
import pytest


@pytest.mark.parametrize('test_input_threshold,expected_result', [(100, 41),
    (1000, 953)])
def test_get_longest_consecutive_prime_sum(test_input_threshold,
    expected_result):
    from src.p050_consecutive_prime_sum import get_longest_consecutive_prime_sum
    actual_result = get_longest_consecutive_prime_sum(test_input_threshold)
    assert sum(actual_result) == expected_result

"""
Problem 50: Consecutive prime sum
https://projecteuler.net/problem=50

The prime 41, can be written as the sum of six consecutive primes:

41 = 2 + 3 + 5 + 7 + 11 + 13
This is the longest sum of consecutive primes that adds to a prime below one-hundred.

The longest sum of consecutive primes below one-thousand that adds to a prime,
contains 21 terms, and is equal to 953.

Which prime, below one-million, can be written as the sum of the most consecutive primes?
"""

import pytest


@pytest.mark.parametrize('test_input_threshold,expected_result', [
    (100, 41),
    (1000, 953),
])
def test_get_longest_consecutive_prime_sum(test_input_threshold, expected_result):
    # arrange
    from src.p050_consecutive_prime_sum import get_longest_consecutive_prime_sum

    # act
    actual_result = get_longest_consecutive_prime_sum(test_input_threshold)

    # assert
    assert sum(actual_result) == expected_result
