Created
January 23, 2013 17:45
-
-
Save iwillspeak/4610901 to your computer and use it in GitHub Desktop.
Grassmannian unit test generation script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import random | |
import string | |
import mdp | |
def foo(): | |
return random.sample(xrange(255), 32) | |
def bar(n): | |
ret = [] | |
for i in range(n): | |
ret.append(foo()) | |
return ret | |
def baz(names): | |
for n in names: | |
print n, " = Grassmann(", ",".join(map(str, bar(4))), ")" | |
if __name__ == "__main__": | |
baz(string.letters[:6]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment