Skip to content

Commit

Permalink
Remove stray debug; 3.7.tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Aug 17, 2017
1 parent 2cf3a1b commit 69f7083
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 6 additions & 4 deletions test/unit/test-bytecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import inspect, unittest

from trepan.lib import bytecode as Mcode
from xdis import IS_PYPY
from xdis import IS_PYPY, PYTHON_VERSION


class TestByteCode(unittest.TestCase):
Expand All @@ -22,10 +22,12 @@ def sqr(x):

def test_op_at_frame(self):
frame = inspect.currentframe()
if IS_PYPY:
self.assertEqual('CALL_METHOD', Mcode.op_at_frame(frame))
if IS_PYPY or PYTHON_VERSION >= 3.7:
call_opcode = 'CALL_METHOD'
else:
self.assertEqual('CALL_FUNCTION', Mcode.op_at_frame(frame))
call_opcode = 'CALL_FUNCTION'

self.assertEqual(call_opcode, Mcode.op_at_frame(frame))
return

def test_is_def_frame(self):
Expand Down
3 changes: 1 addition & 2 deletions trepan/clifns.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2008-2009, 2013 Rocky Bernstein <rocky@gnu.org>
# Copyright (C) 2008-2009, 2013, 2017 Rocky Bernstein <rocky@gnu.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -76,7 +76,6 @@ def whence_file(py_script, dirnames=None):
for dirname in dirnames:
py_script_try = osp.join(dirname, py_script)
if osp.exists(py_script_try):
print("WOOT2", py_script_try)
return osp.realpath(py_script_try)
# Failure
return py_script
Expand Down

0 comments on commit 69f7083

Please sign in to comment.