import pytest

from webcomix.comic import Comic
from webcomix.supported_comics import supported_comics
from webcomix.util import check_first_pages


@pytest.mark.slow
def test_supported_comics():
    for comic_name, comic_info in supported_comics.items():
        comic = Comic(comic_name, *comic_info)
        first_pages = comic.verify_xpath()
        check_first_pages(first_pages)

import pytest

from webcomix.comic import Comic
from webcomix.supported_comics import supported_comics
from webcomix.util import check_first_pages


@pytest.mark.slow
@pytest.mark.parametrize("comic_name", list(supported_comics.keys()))
def test_supported_comics(comic_name):
    comic = Comic(comic_name, *supported_comics[comic_name])
    first_pages = comic.verify_xpath()
    check_first_pages(first_pages)

Test comic availability of all supported comics independently through parametrization
Test comic availability of all supported comics independently through parametrization

  import pytest
  
  from webcomix.comic import Comic
  from webcomix.supported_comics import supported_comics
  from webcomix.util import check_first_pages
  
  
  @pytest.mark.slow
+ @pytest.mark.parametrize("comic_name", list(supported_comics.keys()))
- def test_supported_comics():
+ def test_supported_comics(comic_name):
+     comic = Comic(comic_name, *supported_comics[comic_name])
-     for comic_name, comic_info in supported_comics.items():
-         comic = Comic(comic_name, *comic_info)
-         first_pages = comic.verify_xpath()
+     first_pages = comic.verify_xpath()
-         check_first_pages(first_pages)
+     check_first_pages(first_pages)
  
Test comic availability of all supported comics independently through parametrization
## Code Before:
import pytest

from webcomix.comic import Comic
from webcomix.supported_comics import supported_comics
from webcomix.util import check_first_pages


@pytest.mark.slow
def test_supported_comics():
    for comic_name, comic_info in supported_comics.items():
        comic = Comic(comic_name, *comic_info)
        first_pages = comic.verify_xpath()
        check_first_pages(first_pages)

## Instruction:
Test comic availability of all supported comics independently through parametrization
## Code After:
import pytest

from webcomix.comic import Comic
from webcomix.supported_comics import supported_comics
from webcomix.util import check_first_pages


@pytest.mark.slow
@pytest.mark.parametrize("comic_name", list(supported_comics.keys()))
def test_supported_comics(comic_name):
    comic = Comic(comic_name, *supported_comics[comic_name])
    first_pages = comic.verify_xpath()
    check_first_pages(first_pages)
