# This file is autogenerated with reference to psynet/resources/experiment_scripts/test.py.

# To run this test via Docker, run the following in your terminal:
#
# bash docker/run pytest test.py

# You can customize the behavior of the automated tests by overriding certain methods within
# your experiment class, located in experiment.py:
# - test_experiment
# - test_serial_run_bots
# - test_check_bots
# - test_check_bot

import os

import pytest

pytest_plugins = ["pytest_dallinger", "pytest_psynet"]
experiment_dir = os.path.dirname(__file__)


@pytest.mark.parametrize("experiment_directory", [experiment_dir], indirect=True)
def test_experiment(launched_experiment):
    # NOTE:
    # If pytest reports a failure and prints these lines in your traceback
    # without printing the actual lines within `test_experiment` that raised the error,
    # you may be suffering from a bug in PyCharm's test reporting. To fix this,
    # we recommend either running the test externally (`psynet test local`)
    # or editing your PyCharm run configuration to add `--tb=short` to your additional
    # arguments. This should ensure that the full traceback is printed.
    launched_experiment.test_experiment()
