Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "Source R Script" button should be "Run Tests" if the file contains only tests #2225

Open
jmcphers opened this issue Feb 8, 2024 · 3 comments
Labels
Milestone

Comments

@jmcphers
Copy link
Collaborator

jmcphers commented Feb 8, 2024

Positron Dev Version: 2024.02.0 build 0
Code - OSS Version: 1.86.0
Commit: Unknown
Date: Unknown
Electron: 27.2.3
ElectronBuildId: undefined
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 23.2.0

To reproduce, open an R package containing testthat tests, open an R file containing tests, and then click the Source button at the top.

image

The file is sourced, which just results in errors.

Expected behavior:

  • This should run all the tests in the current file instead (e.g. the command Run Tests in Current File)
  • Ideally the "Source" button would be replaced with a "Run Tests" button, too

Suggested by @hfrick.

@juliasilge
Copy link
Contributor

Can we address this via #2085? cc @jgutman

@jgutman
Copy link
Contributor

jgutman commented Feb 8, 2024

No I think this would be addressed separately, either way the extension would still need to specify a new when condition for the source script command versus run tests command. And I think that work would still carry over, if for example we decided to have the R extension show those action buttons in the breadcrumbs action bar instead

@jennybc
Copy link
Member

jennybc commented Apr 18, 2024

Related to #1359.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants