def test_check(self, flag_check, expected):
     assert StatusFlags(flags=0b1010).check(flag=flag_check) == expected
 def test_check_bad_flag(self):
     with pytest.raises(ValueError):
         StatusFlags(flags=0b1111).check(flag=3)
 def test_enable_happy(self, enable_flag, after):
     assert StatusFlags(flags=0b0000).enable(
         flag=enable_flag).flags == after
 def test_enable_bad_flag(self):
     with pytest.raises(ValueError):
         StatusFlags(flags=0b0000).enable(flag=3)
 def test_disable_bad_flag(self):
     with pytest.raises(ValueError):
         StatusFlags(flags=0b1111).disable(flag=3)
 def test_disable_happy(self, enable_flag, after):
     assert StatusFlags(flags=0b1111).disable(
         flag=enable_flag).flags == after
 def test_construct_bad_flags(self, flags):
     with pytest.raises(pydantic.ValidationError):
         StatusFlags(flags=flags)
 def test_construct_happy(self, before, expected):
     assert StatusFlags(flags=before).flags == expected
 def test_get_flags_with_disabled(self, before, disabled_flags, expected):
     sf = StatusFlags(flags=before)
     with_disabled_flags = sf.get_flags_with_disabled(
         disabled_flags=disabled_flags)
     assert with_disabled_flags.flags == expected