nose-devs / nose

nose is nicer testing for python
http://readthedocs.org/docs/nose/en/latest/
1.36k stars 395 forks source link

Mnt py36 compat #952

Open tacaswell opened 9 years ago

tacaswell commented 9 years ago

getargspec is deprecated in 3.0 and will be removed in 3.6 1. The usage is nose is causing failures in mpl tests for the nightly 3.6 builds 2.

This patch only uses getargspec if inspect.signature is not available.

tacaswell commented 9 years ago

It looks like on 3.5+ the reported class name has changed which is making doc tests fail and 3.2 is failing due to syntax errors in coverage.

jszakmeister commented 9 years ago

Just merged a PR for the coverage issue. You can try rebasing to see if it helps at all.

tacaswell commented 9 years ago

@jszakmeister Rebased.

It looks like there are still issues with doctest on 3.5

======================================================================

FAIL: Doctest: imported_tests.rst

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/opt/python/3.5.0/lib/python3.5/doctest.py", line 2189, in runTest

    raise self.failureException(self.format_failure(new.getvalue()))

AssertionError: Failed doctest test for imported_tests.rst

  File "/home/travis/build/nose-devs/nose/build/tests/functional_tests/doc_tests/test_issue145/imported_tests.rst", line 0

----------------------------------------------------------------------

File "/home/travis/build/nose-devs/nose/build/tests/functional_tests/doc_tests/test_issue145/imported_tests.rst", line 43, in imported_tests.rst

Failed example:

    run(argv=argv) # doctest: +REPORT_NDIFF

Differences (ndiff with -expected +actual):

      package1 setup

      test (package1.test_module.TestCase) ... ok

      package1.test_module.TestClass.test_class ... ok

      package1.test_module.test_function ... ok

      package2c setup

    - test (package2c.test_module.TestCase) ... ok

    ?                             ^^  ^  ^

    + test (package2c.test_module.transplant_class.<locals>.C) ... ok

    ?                             ^^^^ ++++ ^^^  ^^^^^^^^^^^^

      package2c.test_module.TestClass.test_class ... ok

      package2f setup

      package2f.test_module.test_function ... ok

      <BLANKLINE>

      ----------------------------------------------------------------------

      Ran 6 tests in ...s

      <BLANKLINE>

      OK