I have a Django project with almost 900 Django tests. I would like to start using pytest and playwright for some of the new tests so it's necessary the whole test suite can be run under pytest. It worked until I installed pytest-playwright. Since it was installed, every Django test that's not written as a pytest one fails with
file /src/myproject/myproject/app/tests/test_exam.py, line 45
def test_exam_list(self):
file /usr/local/lib/python3.8/site-packages/pytest_playwright/pytest_playwright.py, line 61
@pytest.fixture(autouse=True)
def skip_browsers(request: Any, browser_name: str) -> None:
E fixture 'browser_name' not found
> available fixtures: _UnitTestCase__pytest_class_setup, _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _session_faker, _template_string_if_invalid_marker, _verify_url, admin_client, admin_user, base_url, browser, browser_context_args, browser_type_launch_args, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, celery_app, celery_config, celery_enable_logging, celery_includes, celery_parameters, celery_session_app, celery_session_worker, celery_worker, celery_worker_parameters, celery_worker_pool, class_mocker, client, context, cov, db, depends_on_current_app, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, factoryboy_request, faker, is_chromium, is_firefox, is_webkit, launch_browser, live_server, mailoutbox, mocker, module_mocker, monkeypatch, no_cover, package_mocker, page, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, rf, session_mocker, settings, skip_browsers, testrun_uid, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, transactional_db, use_celery_app_trap, worker_id
> use 'pytest --fixtures [testpath]' for help on them.