KiokuDB::Test(3pm)

πŸ“¦
version 0.57 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

✨ KiokuDB::Test ✨

okay so bestie, this is KiokuDB::Test β€” it lives in the User Contributed Perl Documentation section (that's the 3pm part, iykyk) and it's literally the reusable test suite for KiokuDB backend authors. if you're building a backend, this is your girl. πŸ’–


πŸŽ€ VERSION πŸŽ€

version 0.57 β€” that's the vibe, that's the era, periodt.


🌸 SYNOPSIS 🌸

use Test::More;

use KiokuDB::Test;

use KiokuDB::Backend::MySpecialBackend;

my $b = KiokuDB::Backend::MySpecialBackend->new( ... );

run_all_fixtures( KiokuDB->new( backend => $b ) );

done_testing();

like. that's it. that's the whole ritual. load your backend, hand over a KiokuDB instance, run the fixtures, done_testing(), go to bed. πŸ›οΈβœ¨


πŸ¦‹ DESCRIPTION πŸ¦‹

This module loads and runs KiokuDB::Test::Fixtures against a KiokuDB directory instance.

no cap, that's the entire job. it's the test harness bestie for backend authors. πŸ‘‘


πŸ’… EXPORTS πŸ’…

run_all_fixtures $dir

run_all_fixtures sub { return $dir }

Runs all the KiokuDB::Test::Fixture objects against your dir. every single one. it's giving thorough. 🧚

  • If you need a new instance of KiokuDB for every fixture, pass in a code reference instead. that way each fixture gets a fresh baby KiokuDB and nobody's leftovers contaminate anybody else. clean girl energy. πŸŽ€
  • This will load all the modules in the KiokuDB::Test::Fixture namespace, and run them against your directory. yes, all of them. it goes and finds them. it's very self-sufficient. πŸ”₯
  • Fixtures generally check for backend roles and skip unless the backend supports that set of features. so if your backend doesn't do the thing, the fixture isn't gonna drag you β€” it just skips. no shame in the skip game. πŸ™ˆ

🌈 AUTHOR 🌈

Yuval Kogman <nothingmuch@woobling.org>

shoutout to the author, we love a legend. 🫢


This software is copyright (c) 2014 by Yuval Kogman, Infinity Interactive.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go off, remix it, it's yours to play with. ⭐


fr fr bestie, remember: every fixture, every role check, every skip β€” it's all here so your backend can be its most iconic self. πŸ’œ

and that's the whole page, babes β€” this was KiokuDB::Test, perl v5.34.0, dated 2022-05-23. mwah. πŸ’…πŸŒΈβœ¨

πŸ“¦ where this page comes from