diff --git a/.travis.yml b/.travis.yml index 4f912c0fa2d0..1f1d19aa03a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,7 @@ env: - NPROC=2 - TEST_ARGS=--no-pep8 - NOSE_ARGS="--processes=$NPROC --process-timeout=300" + - PYTHON_ARGS= language: python @@ -51,6 +52,7 @@ matrix: - python: 2.7 env: MOCK=mock NUMPY=numpy==1.6 - python: 3.4 + env: PYTHON_ARGS=-OO - python: 3.5 env: PANDAS=pandas NOSE_ARGS=--with-coverage - python: 3.5 @@ -140,7 +142,7 @@ script: if [[ $TRAVIS_OS_NAME == 'osx' ]]; then python tests.py $NOSE_ARGS $TEST_ARGS else - gdb -return-child-result -batch -ex r -ex bt --args python tests.py $NOSE_ARGS $TEST_ARGS + gdb -return-child-result -batch -ex r -ex bt --args python $PYTHON_ARGS tests.py $NOSE_ARGS $TEST_ARGS fi else cd doc diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index 2b99261b9c85..6bff60503296 100755 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -746,19 +746,21 @@ def get_xlim3d(self): return self.xy_viewLim.intervalx get_xlim3d.__doc__ = maxes.Axes.get_xlim.__doc__ get_xlim = get_xlim3d - get_xlim.__doc__ += """ - .. versionchanged :: 1.1.0 - This function now correctly refers to the 3D x-limits - """ + if get_xlim.__doc__ is not None: + get_xlim.__doc__ += """ + .. versionchanged :: 1.1.0 + This function now correctly refers to the 3D x-limits + """ def get_ylim3d(self): return self.xy_viewLim.intervaly get_ylim3d.__doc__ = maxes.Axes.get_ylim.__doc__ get_ylim = get_ylim3d - get_ylim.__doc__ += """ - .. versionchanged :: 1.1.0 - This function now correctly refers to the 3D y-limits. - """ + if get_ylim.__doc__ is not None: + get_ylim.__doc__ += """ + .. versionchanged :: 1.1.0 + This function now correctly refers to the 3D y-limits. + """ def get_zlim3d(self): '''Get 3D z limits.''' @@ -780,22 +782,24 @@ def set_xscale(self, value, **kwargs) : self.xaxis._set_scale(value, **kwargs) self.autoscale_view(scaley=False, scalez=False) self._update_transScale() - set_xscale.__doc__ = maxes.Axes.set_xscale.__doc__ + """ + if maxes.Axes.set_xscale.__doc__ is not None: + set_xscale.__doc__ = maxes.Axes.set_xscale.__doc__ + """ - .. versionadded :: 1.1.0 - This function was added, but not tested. Please report any bugs. - """ + .. versionadded :: 1.1.0 + This function was added, but not tested. Please report any bugs. + """ def set_yscale(self, value, **kwargs) : self.yaxis._set_scale(value, **kwargs) self.autoscale_view(scalex=False, scalez=False) self._update_transScale() self.stale = True - set_yscale.__doc__ = maxes.Axes.set_yscale.__doc__ + """ + if maxes.Axes.set_yscale.__doc__ is not None: + set_yscale.__doc__ = maxes.Axes.set_yscale.__doc__ + """ - .. versionadded :: 1.1.0 - This function was added, but not tested. Please report any bugs. - """ + .. versionadded :: 1.1.0 + This function was added, but not tested. Please report any bugs. + """ @docstring.dedent_interpd def set_zscale(self, value, **kwargs) : diff --git a/tests.py b/tests.py index 35d112b034a8..db19f5572772 100755 --- a/tests.py +++ b/tests.py @@ -53,4 +53,6 @@ def run(extra_args): extra_args.extend(['-a', '!network']) sys.argv.remove('--no-network') + print('Python byte-compilation optimization level: %d' % sys.flags.optimize) + run(extra_args)