Beispiel #1
0
    def test_spec(self):
        v = base.TokValueGenerate(1, "b", "bytes")
        assert v.spec() == repr(v) == "@1"

        v = base.TokValueGenerate(1, "k", "bytes")
        assert v.spec() == repr(v) == "@1k"

        v = base.TokValueGenerate(1, "k", "ascii")
        assert v.spec() == repr(v) == "@1k,ascii"

        v = base.TokValueGenerate(1, "b", "ascii")
        assert v.spec() == repr(v) == "@1,ascii"
Beispiel #2
0
 def test_freeze(self):
     v = base.TokValueGenerate(100, "b", "ascii")
     f = v.freeze(language.Settings())
     assert len(f.val) == 100