Testing expected failures for required variables

Howdy!

I have a few required variables in my custom AWS module and I would like to write a test that expects a failed test/an error to appear, if they are not defined. Is is possible to do this using expect_failures inside a run block?

If not, how would one create an assertion for this?

Cheers,
Alen M.

Ah, I just realized expect_failures = [] only applies to cases where custom conditions or check block assertions are used.

Which begs the question, is there a way to still assert that a required variable is not defined in a test?