def METHOD_NAME(self) -> None:
    """Test the PackageVariable validator"""
    opts = SCons.Variables.Variables()
    opts.Add(SCons.Variables.PackageVariable('test', 'test option help', '/default/path'))
    test = TestCmd.TestCmd(workdir='')
    test.write('exists', 'exists\n')
    o = opts.options[0]
    env = {'F':False, 'T':True, 'X':'x'}
    exists = test.workpath('exists')
    does_not_exist = test.workpath('does_not_exist')
    o.validator('F', '/path', env)
    o.validator('T', '/path', env)
    o.validator('X', exists, env)
    caught = None
    try:
        o.validator('X', does_not_exist, env)
    except SCons.Errors.UserError:
        caught = 1
    assert caught, "did not catch expected UserError"