Hello. I have some test data in a specific folder ...
# general
f
Hello. I have some test data in a specific folder structure. I am trying to access that data when running a test case. I have used the files() target type, but it doesnt pickup the subfolders structure
1
build file
Copy code
files(name="test-checkpoint",
    sources=["test/test_checkpoint/**"])

files(name="test-data",
    sources=["test/data/*"])

python_tests(
    name="test",
    sources=["test/**", "!test/conftest.py", "!test/test_checkpoint/*", "!test/data/*"],
    dependencies=[":test-data", ":test-checkpoint"],
    resolve="packages-solaris-agents"
)
When i run my test case with the one that needs the test/data it fails saying file not found
h
Hi, you need to add to
python_tests
dependencies=[":test-data"]
because that is not inferred
f
I added that here
Copy code
dependencies=[":test-data", ":test-checkpoint"],
h
Cool, is it working now?
f
yes it works now! Thank you
❤️ 1
I had to change to
Copy code
files(name="test-data",
    sources=["test/data/**"])