Author: Brian Kearns <bdkea...@gmail.com> Branch: Changeset: r69904:9c00b3c1768a Date: 2014-03-12 14:29 -0400 http://bitbucket.org/pypy/pypy/changeset/9c00b3c1768a/
Log: cleanups diff --git a/pypy/module/pypyjit/test/test_ztranslation.py b/pypy/module/pypyjit/test/test_ztranslation.py --- a/pypy/module/pypyjit/test/test_ztranslation.py +++ b/pypy/module/pypyjit/test/test_ztranslation.py @@ -1,5 +1,5 @@ +from pypy.objspace.fake.checkmodule import checkmodule -from pypy.objspace.fake.checkmodule import checkmodule def test_pypyjit_translates(): checkmodule('pypyjit') diff --git a/pypy/module/pypyjit/test_pypy_c/test_00_model.py b/pypy/module/pypyjit/test_pypy_c/test_00_model.py --- a/pypy/module/pypyjit/test_pypy_c/test_00_model.py +++ b/pypy/module/pypyjit/test_pypy_c/test_00_model.py @@ -7,13 +7,13 @@ from rpython.tool.udir import udir from rpython.tool import logparser from rpython.jit.tool.jitoutput import parse_prof -from pypy.module.pypyjit.test_pypy_c.model import (Log, find_ids_range, - find_ids, - OpMatcher, InvalidMatch) +from pypy.module.pypyjit.test_pypy_c.model import \ + Log, find_ids_range, find_ids, OpMatcher, InvalidMatch + class BaseTestPyPyC(object): log_string = 'jit-log-opt,jit-log-noopt,jit-log-virtualstate,jit-summary' - + def setup_class(cls): if '__pypy__' not in sys.builtin_module_names: py.test.skip("must run this test with pypy") @@ -98,7 +98,6 @@ class TestLog(object): - def test_find_ids_range(self): def f(): a = 0 # ID: myline @@ -127,7 +126,6 @@ class TestOpMatcher_(object): - def match(self, src1, src2, **kwds): from rpython.tool.jitlogparser.parser import SimpleParser loop = SimpleParser.parse_from_input(src1) @@ -347,7 +345,6 @@ class TestRunPyPyC(BaseTestPyPyC): - def test_run_function(self): def f(a, b): return a+b @@ -385,7 +382,7 @@ assert len(loops) == 1 assert loops[0].filename == self.filepath assert len([op for op in loops[0].allops() if op.name == 'label']) == 0 - assert len([op for op in loops[0].allops() if op.name == 'guard_nonnull_class']) == 0 + assert len([op for op in loops[0].allops() if op.name == 'guard_nonnull_class']) == 0 # loops = log.loops_by_filename(self.filepath, is_entry_bridge=True) assert len(loops) == 1 @@ -454,7 +451,6 @@ # ops = loop.ops_by_id('foo', opcode='INPLACE_SUBTRACT') assert log.opnames(ops) == ['int_sub_ovf', 'guard_no_overflow'] - def test_inlined_function(self): def f(): diff --git a/rpython/rlib/rfile.py b/rpython/rlib/rfile.py --- a/rpython/rlib/rfile.py +++ b/rpython/rlib/rfile.py @@ -132,8 +132,8 @@ The actual return value may be determined with os.WEXITSTATUS. """ + res = 0 ll_f = self.ll_file - res = 0 if ll_f: # double close is allowed self.ll_file = lltype.nullptr(FILE) diff --git a/rpython/rlib/test/test_rfile.py b/rpython/rlib/test/test_rfile.py --- a/rpython/rlib/test/test_rfile.py +++ b/rpython/rlib/test/test_rfile.py @@ -1,9 +1,9 @@ - import os, sys, py from rpython.rtyper.test.tool import BaseRtypingTest from rpython.tool.udir import udir from rpython.rlib import rfile + class TestFile(BaseRtypingTest): def setup_class(cls): cls.tmpdir = udir.join('test_rfile') @@ -208,6 +208,7 @@ assert s == "%s\n" % printval assert os.WEXITSTATUS(r) == retval + class TestPopenR(BaseRtypingTest): def setup_class(cls): if sys.platform == 'win32': _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit