Merged revisions 79297,79310,79382,79425-79427,79450 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79297 | florent.xicluna | 2010-03-22 18:18:18 +0100 (lun, 22 mar 2010) | 2 lines

  #7668: Fix test_httpservers failure when sys.executable contains non-ASCII bytes.
........
  r79310 | florent.xicluna | 2010-03-22 23:52:11 +0100 (lun, 22 mar 2010) | 2 lines

  Issue #8205: Remove the "Modules" directory from sys.path when Python is running from the build directory (POSIX only).
........
  r79382 | florent.xicluna | 2010-03-24 20:33:25 +0100 (mer, 24 mar 2010) | 2 lines

  Skip tests which depend on multiprocessing.sharedctypes, if _ctypes is not available.
........
  r79425 | florent.xicluna | 2010-03-25 21:32:07 +0100 (jeu, 25 mar 2010) | 2 lines

  Syntax cleanup `== None` -> `is None`
........
  r79426 | florent.xicluna | 2010-03-25 21:33:49 +0100 (jeu, 25 mar 2010) | 2 lines

  #8207: Fix test_pep277 on OS X
........
  r79427 | florent.xicluna | 2010-03-25 21:39:10 +0100 (jeu, 25 mar 2010) | 2 lines

  Fix test_unittest and test_warnings when running "python -Werror -m test.regrtest"
........
  r79450 | florent.xicluna | 2010-03-26 20:32:44 +0100 (ven, 26 mar 2010) | 2 lines

  Ensure that the failed or unexpected tests are sorted before printing.
........
This commit is contained in:
Florent Xicluna 2010-03-28 00:25:02 +00:00
parent c049d870b5
commit fd1b0930ce
12 changed files with 97 additions and 81 deletions

View file

@ -778,7 +778,7 @@ class TurtleScreenBase(object):
# needs amendment
if not isinstance(self.cv, ScrolledCanvas):
return self.canvwidth, self.canvheight
if canvwidth is None and canvheight is None and bg is None:
if canvwidth is canvheight is bg is None:
return self.cv.canvwidth, self.cv.canvheight
if canvwidth is not None:
self.canvwidth = canvwidth
@ -1046,7 +1046,7 @@ class TurtleScreen(TurtleScreenBase):
>>> mode()
'logo'
"""
if mode == None:
if mode is None:
return self._mode
mode = mode.lower()
if mode not in ["standard", "logo", "world"]:
@ -1385,7 +1385,7 @@ class TurtleScreen(TurtleScreenBase):
### repeatedly pressing the up-arrow key,
### consequently drawing a hexagon
"""
if fun == None:
if fun is None:
if key in self._keys:
self._keys.remove(key)
elif key not in self._keys:
@ -1418,7 +1418,7 @@ class TurtleScreen(TurtleScreenBase):
### or by keeping pressed the up-arrow key.
### consequently drawing a hexagon.
"""
if fun == None:
if fun is None:
if key in self._keys:
self._keys.remove(key)
elif key is not None and key not in self._keys:
@ -1540,7 +1540,7 @@ class TNavigator(object):
def _setmode(self, mode=None):
"""Set turtle-mode to 'standard', 'world' or 'logo'.
"""
if mode == None:
if mode is None:
return self._mode
if mode not in ["standard", "logo", "world"]:
return
@ -2795,7 +2795,7 @@ class RawTurtle(TPen, TNavigator):
>>> turtle.shapesize(5, 5, 12)
>>> turtle.shapesize(outline=8)
"""
if stretch_wid is stretch_len is outline == None:
if stretch_wid is stretch_len is outline is None:
stretch_wid, stretch_len = self._stretchfactor
return stretch_wid, stretch_len, self._outlinewidth
if stretch_wid == 0 or stretch_len == 0: