Issue #442 closed
_wiz_ created an issue

When I run the tests for py-coverage-4.0.2 (tarball from pypi), I see lots of working tests and then it stops with:

test_universal_newlines (tests.test_execfile.RunFileTest) ... Hello, world!
Hello, world!
Hello, world!
ok
test_no_main (tests.test_execfile.RunModuleTest) ... ok
test_no_such_module (tests.test_execfile.RunModuleTest) ... ok
test_pkg1_init (tests.test_execfile.RunModuleTest) ... pkg1.__init__: pkg1
pkg1.__init__: __main__
ok
test_pkg1_main (tests.test_execfile.RunModuleTest) ... pkg1.__init__: pkg1
pkg1.__main__: passed hello
ok
test_pkg1_sub_main (tests.test_execfile.RunModuleTest) ... pkg1.__init__: pkg1
pkg1.sub.__main__: passed hello
ok
test_runmod1 (tests.test_execfile.RunModuleTest) ... runmod1: passed hello
ok
test_runmod2 (tests.test_execfile.RunModuleTest) ... pkg1.__init__: pkg1
runmod2: passed hello
ok
test_runmod3 (tests.test_execfile.RunModuleTest) ... pkg1.__init__: pkg1
runmod3: passed hello
ok
test_no_such_pyc_file (tests.test_execfile.RunPycFileTest) ... ok
test_running_pyc (tests.test_execfile.RunPycFileTest) ... I am here!
ok
test_running_pyc_from_wrong_python (tests.test_execfile.RunPycFileTest) ... ok
test_running_pyo (tests.test_execfile.RunPycFileTest) ... I am here!
ok
Traceback (most recent call last):
  File "setup.py", line 197, in <module>
    main()
  File "setup.py", line 187, in main
    setup(**setup_args)
  File "/usr/pkg/lib/python3.4/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/pkg/lib/python3.4/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/pkg/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/pkg/lib/python3.4/site-packages/setuptools/command/test.py", line 146, in run
    self.with_project_on_sys_path(self.run_tests)
  File "/usr/pkg/lib/python3.4/site-packages/setuptools/command/test.py", line 127, in with_project_on_sys_path
    func()
  File "/usr/pkg/lib/python3.4/site-packages/setuptools/command/test.py", line 167, in run_tests
    testRunner=self._resolve_as_ep(self.test_runner),
  File "/usr/pkg/lib/python3.4/unittest/main.py", line 93, in __init__
    self.runTests()
  File "/usr/pkg/lib/python3.4/unittest/main.py", line 244, in runTests
    self.result = testRunner.run(self.test)
  File "/usr/pkg/lib/python3.4/unittest/runner.py", line 168, in run
    test(result)
  File "/usr/pkg/lib/python3.4/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/pkg/lib/python3.4/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/pkg/lib/python3.4/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/pkg/lib/python3.4/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/pkg/lib/python3.4/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/pkg/lib/python3.4/unittest/suite.py", line 122, in run
    test(result)
TypeError: __call__() takes 1 positional argument but 2 were given
*** Error code 1

That's with python-3.4.3, nose-1.3.7, setuptools-18.4 on NetBSD.

Btw, I can't choose version "4.0.2" in the selection box, the newest is 4.0.1.

Comments (4)

  1. Ned Batchelder repo owner

    You don't show here how you are running the tests. They aren't meant to be run with unittest, they are run with nose. The simplest way to run them is with tox, the tox.ini will take care of everything.

  2. _wiz_ reporter

    Thanks for the feedback. As you noticed, I'm new to running tests for python.

    I now tried running nosetests-3.4 in the directory and get FAILED (SKIP=5, errors=28, failures=94), many of which are due to 'python' and 'coverage' not existing. I only have a versioned python interpreter (python3.4) and for some reason, "build/lib.netbsd-7.99.21-amd64-3.4/coverage" is not in the PATH -- shouldn't it be? It'd be good to be able to test this before installation.

    The complete output is >2900 lines, I can provide if you want.

    Thanks.

  3. Log in to comment