def test_fixedunpacked(self): space = DummySpace() args = Arguments(space, [], ["k"], [1]) py.test.raises(ValueError, args.fixedunpack, 1) args = Arguments(space, ["a", "b"]) py.test.raises(ValueError, args.fixedunpack, 0) py.test.raises(ValueError, args.fixedunpack, 1) py.test.raises(ValueError, args.fixedunpack, 3) py.test.raises(ValueError, args.fixedunpack, 4) assert args.fixedunpack(2) == ['a', 'b']