https://pantsbuild.org/ logo
#development
Title
# development
w

witty-crayon-22786

05/23/2022, 11:36 PM
@fast-nail-55400: i’m attempting to use
@pytest.mark.jvm_lockfile
in a test, and have successfully generated the lockfile via
internal-generate-test-lockfile-fixtures
(afaict). but then running the test reports:
Copy code
@pytest.mark.jvm_lockfile(
      path="scala-library-2.13.test.lock", requirements=["org.scala-lang:scala-library:2.13.8"]
  )
  def test_intellij_test(jvm_rule_runner: RuleRunner, jvm_lockfile: JVMLockfileFixture) -> None:
E       fixture 'jvm_lockfile' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, cov, doctest_namespace, extra, include_metadata_in_junit_xml, jvm_rule_runner, metadata, monkeypatch, no_cover, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.
any ideas?
f

fast-nail-55400

05/23/2022, 11:50 PM
You also need to register the pytest plug-in in a conftest.py.
w

witty-crayon-22786

05/23/2022, 11:50 PM
mm.
thanks!
f

fast-nail-55400

05/23/2022, 11:50 PM
Scala and Kotlin already do so.
w

witty-crayon-22786

05/24/2022, 11:42 PM
this ended up working really well: thank you!
f

fast-nail-55400

05/24/2022, 11:43 PM
Glad you found it useful!
w

witty-crayon-22786

05/24/2022, 11:44 PM