<#20417 Cannot access `.ini` file from another dir...
# github-notifications
c
#20417 Cannot access `.ini` file from another directory Issue created by Nathan-Furnal Describe the bug I have a
alembic.ini
file to configure migrations, it sits in the root directory of the project. There doesn't seem to be a way to access that file in the
tests/
directory. Pants version 2.18.1 OS MacOS Additional info I tried to setup a
file
inside the
BUILD
file of the root directory.
Copy code
file(
    name="alembic",
    source="alembic.ini"
)
Now, I just want to read that alembic file in the
conftest.py
which is in
tests/conftest.py
. Pants complains, when running
pants test ::
that there is no
alembic.ini
file. So, I tried to add a dependency in
tests/BUILD
, like:
Copy code
python_test_utils(
    name="test_utils",
)

python_tests(
    name="tests",
    dependencies=[
        ":alembic"
    ]
)
This doesn't work as there is no
:alembic
file accessible apparently. How do I make that config file available to pants during testing? pantsbuild/pants