bland-horse-61839
03/30/2020, 11:18 AMhundreds-father-404
03/30/2020, 3:28 PMa/b/tests/BUILD? If so, sources should be * rather than a/b/tests/*.
Also, use **/* if you want to have a recursive glob, although, this is discouraged because it means you won’t get as fine grained of caching. See https://www.pantsbuild.org/build_files.html#target-granularitybland-horse-61839
03/30/2020, 7:54 PMahundreds-father-404
03/30/2020, 7:57 PMa, then you would want your glob to be something like b/tests/pytest.ini or b/**/*hundreds-father-404
03/30/2020, 7:59 PM--pytest-config that you can set globally, like we have --black-config and --isort-config.happy-kitchen-89482
03/30/2020, 9:34 PMsources=["a/b/tests/*"] is righthappy-kitchen-89482
03/30/2020, 9:34 PMahappy-kitchen-89482
03/30/2020, 9:42 PMhappy-kitchen-89482
03/30/2020, 9:42 PMhappy-kitchen-89482
03/30/2020, 9:44 PMhappy-kitchen-89482
03/30/2020, 9:46 PMhappy-kitchen-89482
03/30/2020, 9:46 PM[] in no name <path to pytest.ini> in any of [] is interestingbland-horse-61839
03/31/2020, 9:45 AMbland-horse-61839
03/31/2020, 9:47 AMpants test a:tests to see the results. I'm using pants 1.25.0bland-horse-61839
03/31/2020, 9:49 AMa folder and a/tests folderbland-horse-61839
03/31/2020, 9:50 AMERROR: not found: /home/udi/pants-test/.pants.d/pyprep/sources/fad50c981db7799628408665542675aafc6f104b-DefaultFingerprintStrategy_b320b3b2f022/tests/pytest.ini
(no name '/home/udi/pants-test/.pants.d/pyprep/sources/fad50c981db7799628408665542675aafc6f104b-DefaultFingerprintStrategy_b320b3b2f022/tests/pytest.ini' in any of [])
bland-horse-61839
03/31/2020, 9:54 AMpytest.ini file, but it happens for every file that doesn't ends with .py . For an example if you will create a/test/aaa the same problem will occuer for aaa file. BUT it you will change the file name from aaa to aaa.py the problem will go away
@hundreds-father-404 @happy-kitchen-89482hundreds-father-404
03/31/2020, 3:10 PMpytest.ini in a different target type please?
# a/b/tests/BUILD
resources(
name="pytest_ini",
sources=["pytest.ini"],
)
Then, in whatever your test target is
python_tests(
name="whatever this was before",
sources=["**/*.py"],
dependencies=[
"a/b/tests:pytest_ini",
],
)hundreds-father-404
03/31/2020, 3:10 PMresources doesn’t work how you’d expect, try filesbland-horse-61839
03/31/2020, 3:34 PMpytest.ini so pytest will complain it can't interpret and it doesn't do thatbland-horse-61839
03/31/2020, 3:35 PMbland-horse-61839
03/31/2020, 3:43 PMresources and files. Same result for bothhappy-kitchen-89482
03/31/2020, 5:25 PMbland-horse-61839
03/31/2020, 6:48 PMbland-horse-61839
03/31/2020, 6:48 PMhappy-kitchen-89482
04/01/2020, 5:51 PMhappy-kitchen-89482
04/01/2020, 5:53 PMpants runner script in that repo? I don't see one in the tarballhappy-kitchen-89482
04/01/2020, 5:53 PMbland-horse-61839
04/01/2020, 7:55 PMbland-horse-61839
04/01/2020, 7:55 PMhundreds-father-404
04/01/2020, 7:56 PMbland-horse-61839
04/01/2020, 8:13 PMhappy-kitchen-89482
04/02/2020, 12:22 AMhappy-kitchen-89482
04/02/2020, 12:23 AMbland-horse-61839
04/02/2020, 8:00 AMhappy-kitchen-89482
04/02/2020, 6:20 PMtest, binary, run, repl, setup-py, awslambda, fmt, lint. So basically parity with v1, for Python, except for codegen (which is coming soon).happy-kitchen-89482
04/02/2020, 6:20 PMhappy-kitchen-89482
04/02/2020, 6:20 PMbland-horse-61839
04/02/2020, 6:53 PMhappy-kitchen-89482
04/02/2020, 7:13 PMhappy-kitchen-89482
04/02/2020, 7:15 PMhappy-kitchen-89482
04/02/2020, 7:15 PMhappy-kitchen-89482
04/02/2020, 7:17 PMhappy-kitchen-89482
04/02/2020, 7:17 PMhappy-kitchen-89482
04/02/2020, 7:18 PMbland-horse-61839
04/02/2020, 9:35 PM