big-crayon-94763
06/10/2023, 7:41 PMrun_pants
is there anyway to get a reference to the original file directory before it is moved into the test tmpdir? I have tried a __file__
in my test file but it is not executed until after it is moved. I need to copy some other files from our monorepo into the test directory in addition to creating some test filesfast-nail-55400
06/10/2023, 7:54 PMresources
which are then depended on by the python_tests
target.fast-nail-55400
06/10/2023, 7:55 PMpkgutil.get_data
or equivalent.big-crayon-94763
06/10/2023, 7:58 PMbig-crayon-94763
06/10/2023, 8:13 PMInvalidFieldException: The 'sources' field in target pants-plugins/internal_plugins/myplugin:tests must not have globs with the pattern `../` because targets can only have sources in the current directory or subdirectories. It was set to: ['../../../folder_i_need']
big-crayon-94763
06/10/2023, 8:14 PM--backend-packages
flag with run pants. This is working minus that fact that I have a hard coded reference to the folder_i_need
python_tests(
name="tests",
sources=["../../../folder_i_need"],
dependencies=[":myplugin"],
)
fast-nail-55400
06/10/2023, 9:47 PMresources
target in the other directory and then reference that resources
target via the dependencies
field of the python_tests
targetfast-nail-55400
06/10/2023, 9:48 PMbig-crayon-94763
06/10/2023, 9:49 PMbig-crayon-94763
06/10/2023, 9:50 PMbig-crayon-94763
06/10/2023, 10:04 PM