aloof-airline-74337
04/16/2024, 1:10 AMwide-midnight-78598
04/16/2024, 3:05 AMwide-midnight-78598
04/16/2024, 3:05 AMnose_pex_request = Get(VenvPex, PexRequest, <http://nose.to|nose.to>_pex_request())wide-midnight-78598
04/16/2024, 3:06 AMxdist_concurrency: PythonTestsXdistConcurrencyField
batch_compatibility_tag: PythonTestsBatchCompatibilityTagFieldwide-midnight-78598
04/16/2024, 3:07 AM@rule(desc="Run Python test(s) with Nose") # type: ignore
async def run_nose_test(
batch: NoseRequest.Batch[NoseTestFieldSet, Any],
nose: NoseTool,
test_subsystem: TestSubsystem,
global_options: GlobalOptions,
) -> TestResult:
transitive_targets = await Get(
TransitiveTargets, TransitiveTargetsRequest((batch.single_element.address,))
)
raise NotImplementedError()
# ...aloof-airline-74337
04/16/2024, 3:26 AMaloof-airline-74337
04/16/2024, 3:27 AMnose_pex_request = Get(VenvPex, PexRequest, <http://nose.to|nose.to>_pex_request()), but now the following error occurs:
20:25:57.85 [INFO] Initializing scheduler...
20:25:59.91 [INFO] Scheduler initialized.
20:25:59.98 [WARN] No applicable files or targets matched. The `test` goal works with these target types:
* python_test
However, you only specified file arguments with these target types:
* nose_test
Please specify relevant file and/or target arguments. Run `pants --filter-target-type=python_test list ::` to find all applicable targets in your project, or run `pants --filter-target-type=python_test filedeps ::` to find all applicable files.aloof-airline-74337
04/16/2024, 3:27 AMaloof-airline-74337
04/16/2024, 3:29 AMgorgeous-winter-99296
04/16/2024, 10:48 AMpython_test target? The field sets says the latter, but you have your own target.gorgeous-winter-99296
04/16/2024, 10:49 AMcurved-television-6568
04/16/2024, 10:58 AMcurved-television-6568
04/16/2024, 10:59 AMcurved-television-6568
04/16/2024, 11:01 AMwide-midnight-78598
04/16/2024, 1:35 PMpython_test target took a runner, which allowed swapping in pytest, nose, and whatever Rust-based replacement Astral will eventually come out withaloof-airline-74337
04/17/2024, 6:46 PMaloof-airline-74337
04/17/2024, 6:47 PMnose_test targets (it was suggested to me this would be more straightforward initially) I'd be interested in seeing how I could get python_test to not launch pytest but nose instead. I tried extending it with a runner field but didn't get very farwide-midnight-78598
04/17/2024, 6:53 PMnose_tests where needed would DEFINITELY be faster in the short term... Then eventually, if we solve the much cooler problem of dynamic test runners, it would basically be a grep and replace.
I have to look into pytest at some point, because I've just blindly used what we have already - but I can't imagine it's that hard to do - using a much less complicated version of what I did for C/C++ compilers, where it is either auto-selected, or you can select/define onewide-midnight-78598
04/17/2024, 6:54 PMaloof-airline-74337
04/17/2024, 6:58 PMpython_tests to see if I could divert somehow, but to no avail 🙂 I'll stick with nose_test(s) for nowwide-midnight-78598
04/17/2024, 7:00 PMasync def setup_pytest_for_target(
request: TestSetupRequest,
pytest: PyTest,
test_subsystem: TestSubsystem,
coverage_config: CoverageConfig,
coverage_subsystem: CoverageSubsystem,
test_extra_env: TestExtraEnv,
) -> TestSetup: