diff options
author | Roy Williams <rwilliams@lyft.com> | 2016-09-21 17:44:25 -0700 |
---|---|---|
committer | Roy Williams <rwilliams@lyft.com> | 2016-09-21 17:44:25 -0700 |
commit | 940ed7e943c63e2eb9df1d537775692021ff0a53 (patch) | |
tree | 0fe0ce0978b3813bfc3d42c267695294e164b05d /_pytest/assertion | |
parent | 7660a19d0a39adb9724b9acba05e64acf3fcc5ac (diff) | |
download | pytest-940ed7e943c63e2eb9df1d537775692021ff0a53.tar.gz |
Fix `DeprecationWarnings` found when running py.test in Python 2.7 with the -3 flag.
Running through some of my tests with the `-3` flag in python2.7 I encountered some errors within py.test itself. This fixes those errors so we can use py.test in order to identify problems with Python 3.
Diffstat (limited to '_pytest/assertion')
-rw-r--r-- | _pytest/assertion/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/_pytest/assertion/util.py b/_pytest/assertion/util.py index 2481cf34c..4a0a4e431 100644 --- a/_pytest/assertion/util.py +++ b/_pytest/assertion/util.py @@ -105,7 +105,7 @@ except NameError: def assertrepr_compare(config, op, left, right): """Return specialised explanations for some operators/operands""" width = 80 - 15 - len(op) - 2 # 15 chars indentation, 1 space around op - left_repr = py.io.saferepr(left, maxsize=int(width/2)) + left_repr = py.io.saferepr(left, maxsize=int(width//2)) right_repr = py.io.saferepr(right, maxsize=width-len(left_repr)) summary = u('%s %s %s') % (ecu(left_repr), op, ecu(right_repr)) |