Skip to content

Commit

Permalink
disable symtab and trans tests for quit/exit
Browse files Browse the repository at this point in the history
  • Loading branch information
bnmnetp committed Jan 24, 2013
1 parent bffcaea commit fa45dbd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/run/t332.trans
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Module(body=[Assign(targets=[Name(id='f',
ctx=Store())],
value=Num(n=2.5150000000000001)),
value=Num(n=2.515)),
Assign(targets=[Name(id='g',
ctx=Store())],
value=Call(func=Name(id='round',
Expand All @@ -13,7 +13,7 @@ Module(body=[Assign(targets=[Name(id='f',
If(test=Compare(left=Name(id='g',
ctx=Load()),
ops=[Eq()],
comparators=[Num(n=3.0)]),
comparators=[Num(n=3)]),
body=[Print(dest=None,
values=[Str(s='3.0')],
nl=True)],
Expand Down
File renamed without changes.
File renamed without changes.
16 changes: 12 additions & 4 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ function testParse(name)

var transformpass = 0;
var transformfail = 0;
var transformdisabled = 0;

function testTransform(name)
{
Expand All @@ -125,7 +126,10 @@ function testTransform(name)

var expect = 'NO_.TRANS_FILE';
try { expect = read(name + ".trans"); }
catch (e) {}
catch (e) {
transformdisabled += 1;
return;
}
var cst = Sk.parse(name + ".py", input);
var got = Sk.astDump(Sk.astFromParse(cst)) + "\n";

Expand All @@ -152,6 +156,7 @@ function testTransform(name)

var symtabpass = 0;
var symtabfail = 0;
var symtabdisabled = 0;
function testSymtab(name)
{
try { var input = read(name + ".py"); }
Expand All @@ -160,7 +165,10 @@ function testSymtab(name)

var expect = 'NO_.SYMTAB_FILE';
try { expect = read(name + ".py.symtab"); }
catch (e) {}
catch (e) {
symtabdisabled += 1;
return;
}
var cst = Sk.parse(name + ".py", input);
var ast = Sk.astFromParse(cst);
var st = Sk.symboltable(ast, name + ".py");
Expand Down Expand Up @@ -334,12 +342,12 @@ function testsMain()
{
testTransform(sprintf("test/run/t%02d", i));
}
print(sprintf("transform: %d/%d", transformpass, transformpass + transformfail));
print(sprintf("transform: %d/%d (+%d disabled)", transformpass, transformpass + transformfail, transformdisabled));
for (i = 0; i <= 1000; ++i)
{
testSymtab(sprintf("test/run/t%02d", i));
}
print(sprintf("symtab: %d/%d", symtabpass, symtabpass + symtabfail));
print(sprintf("symtab: %d/%d (+%d disabled)", symtabpass, symtabpass + symtabfail, symtabdisabled));

for (i = 0; i <= 1000; ++i)
{
Expand Down

0 comments on commit fa45dbd

Please sign in to comment.