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

Documentation request: equivalent of ERT's skip-unless #173

Open
cpitclaudel opened this issue May 5, 2020 · 1 comment
Open

Documentation request: equivalent of ERT's skip-unless #173

cpitclaudel opened this issue May 5, 2020 · 1 comment

Comments

@cpitclaudel
Copy link

ERT has a convenient (skip-unless …) form that makes a test conditional. What's the equivalent in buttercup?

Signaling from it (e.g. (signal 'buttercup-pending "SKIPPED (interactive-only)")) works fine, but signaling from describe doesn't print anything next to the section title; that is, this code:

(describe "Mode Line"
  (signal 'buttercup-pending "SKIPPED (interactive-only)")

outputs this:


Mode Line

I also tried adding the signal form to a before-each, but that didn't seem to do anything.

@snogge
Copy link
Collaborator

snogge commented May 5, 2020

There is the (undoumented) assume macro, which does more or less the same as your signalcommand. It is not possible to use in describe, only in it.

It should be possible to use assumein a before-each, but due to how the test runner is implemented it will still run the it form. If the it form signals an error the spec should be marked as failing rather than skipped.
But your experiments show differently, I'll have to investigate further at a later time.

Se also #119.

I have some ideas on how to address this, but it will require some rework of the internal plumbing which always feels a bit risky.

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

No branches or pull requests

2 participants