SHTK_UNITTEST_SKIP(3)

πŸ“¦ version 1.7, in nixos 26.05, nixpkgs unstable

πŸ’… SHTK_UNITTEST_SKIP(3) β€” the skip-it-sis era

okay so bestie, real talk: this is a page from the shtk manual, and it's all about the shtk_unittest_skip function. she's giving "I'm not failing, I'm just exiting the situation" and honestly? iconic behavior.

✨ LIBRARY ✨

You get this one by importing the unittest module:

shtk_import unittest

no cap, that's the whole vibe. πŸŽ€

🌸 SYNOPSIS 🌸

shtk_unittest_skip [arg1 .. argN]

πŸ’– DESCRIPTION πŸ’–

So shtk_unittest_skip marks the test that's currently running as skipped, and then it just aborts execution, periodt. Like, she's done, she's leaving the group chat. πŸ™ˆ

The message you pass in arg1 through argN gets printed right alongside the skip condition, so future-you (and your besties) can see exactly why the test dipped out. πŸ¦‹

Now here's the part that matters most, and it's lowkey the whole point: skipped tests do not count as failures. They're not a red flag, they're not a πŸ’€ moment. They just represent a test that can't successfully be executed, and so it's ignored. That's it, that's the vibe check. ✨

πŸ”₯ EXAMPLES πŸ”₯

picture this: a test case that needs a specific file to actually be present on the system. main character energy, but conditional:

      shtk_unittest_add_test motd_contents
      motd_contents_test() {
          [ -f /etc/motd ] || skip "/etc/motd not found; cannot validate"

          ... do something with /etc/motd here ...
      }

see how she checks first? [ -f /etc/motd ], and if that file's not there she hits skip with the message. no sadness club, no false failure, just a clean little bail. 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

⭐ HISTORY ⭐

shtk_unittest_skip first appeared in shtk 1.6. our girl has been serving since day one. 🧚


and that's the whole page, bestie! shoutout to the Debian crew for shtk 1.6-era docs dated November 8, 2014 β€” genuinely a whole era ago, and she's still slaying the manual game. πŸŒˆπŸ’œ

πŸ“¦ where this page comes from