Commit c040eaee by Vik Paruchuri

moving around files and working on tests

parent 6b80f741
......@@ -16,5 +16,6 @@ Runnable files:
Submits test data found in directories within the tests folder to the xserver and displays results. See tests/simple_essay for an example of how to format files. You need payload.json, wrong.txt, and answer.txt to make a test.
Testing:
Tests can be run by running nosetests in the tests directory.
Tests can be run by running nosetests in the tests directory. Make sure the test server is running first!
......@@ -13,7 +13,7 @@ import numpy
base_path = os.path.dirname(__file__)
sys.path.append(base_path)
from essay_set import essay_set
from essay_set import EssaySet
#Imports needed to unpickle grader data
import feature_extractor
......
{"grader":"models/essay_set_1.p"}
{"grader":"tests/models/essay_set_1.p"}
{"grader":"models/essay_set_1.p"}
{"grader":"tests/models/essay_set_1.p"}
......@@ -76,7 +76,7 @@ def contents(fname):
with open(fname) as f:
return f.read()
def check(dirname):
def check(dirname,type):
"""
Look for payload.json, answer*.py, right*.py, wrong*.py, run tests.
"""
......@@ -103,7 +103,7 @@ def check(dirname):
print "Checking wrong response from {0}".format(name)
answer = contents(name)
wrong=check_wrong(send(payload, answer))
if(type=="test"):
assert wrong and right
def main(argv):
......@@ -123,7 +123,7 @@ def main(argv):
root=os.path.dirname( os.path.abspath(__file__ ))
for dirpath, _, _ in os.walk(root):
print("checking" + dirpath)
check(dirpath)
check(dirpath,"normal")
if __name__=="__main__":
main(sys.argv[1:])
......@@ -132,7 +132,7 @@ def test_graders():
root=os.path.dirname( os.path.abspath(__file__ ))
for dirpath, _, _ in os.walk(root):
print("checking" + dirpath)
yield check, dirpath
yield check, dirpath, "test"
def test_model_creation():
model_creator_dir=os.path.abspath(os.path.join(os.path.dirname(__file__),'..'))
......
in order to replicate this experiment , we would need to know the temperature of the vinegar as well as how much vinegar to put in . both of these could vary and therefore change the result of the experiment .
\ No newline at end of file
what you would require cipher everything appear to embody okay with the procedure .
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment