[Checkins] [zopefoundation/zdaemon] 3e4a16: Make tox -e coverage work

GitHub noreply at github.com
Wed Apr 15 10:28:45 CEST 2015


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/zdaemon
  Commit: 3e4a16cf1c3e515a1c122da447699148e4fe8414
      https://github.com/zopefoundation/zdaemon/commit/3e4a16cf1c3e515a1c122da447699148e4fe8414
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2015-04-15 (Wed, 15 Apr 2015)

  Changed paths:
    M tox.ini

  Log Message:
  -----------
  Make tox -e coverage work

nose-based version was failing for me:

$ tox -e coverage
coverage recreate: /home/mg/src/zopefoundation/zdaemon/.tox/coverage
coverage installdeps: zc.customdoctests, zope.testing, zope.testrunner, manuel, mock, nose, coverage, nosexcover
coverage develop-inst: /home/mg/src/zopefoundation/zdaemon
coverage runtests: PYTHONHASHSEED='555400718'
coverage runtests: commands[0] | nosetests --with-xunit --with-xcoverage
E....E.........................E..............EEEE.EEEEEE.EE..............
======================================================================
ERROR: test suite for <module 'zdaemon.tests.tests' from '/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/tests.pyc'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/zopefoundation/zdaemon/.tox/coverage/local/lib/python2.7/site-packages/nose/suite.py", line 209, in run
    self.setUp()
  File "/home/mg/src/zopefoundation/zdaemon/.tox/coverage/local/lib/python2.7/site-packages/nose/suite.py", line 292, in setUp
    self.setupContext(ancestor)
  File "/home/mg/src/zopefoundation/zdaemon/.tox/coverage/local/lib/python2.7/site-packages/nose/suite.py", line 315, in setupContext
    try_run(context, names)
  File "/home/mg/src/zopefoundation/zdaemon/.tox/coverage/local/lib/python2.7/site-packages/nose/util.py", line 469, in try_run
    return func(obj)
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/tests.py", line 321, in setUp
    test.globs['_td'] = td = []
AttributeError: 'module' object has no attribute 'globs'

======================================================================
ERROR: help_test_helper (zdaemon.tests.testzdoptions.TestBasicFunctionality)
----------------------------------------------------------------------
TypeError: help_test_helper() takes exactly 4 arguments (1 given)

======================================================================
ERROR: help_test_helper (zdaemon.tests.testzdoptions.TestZDOptions)
----------------------------------------------------------------------
TypeError: help_test_helper() takes exactly 4 arguments (1 given)

======================================================================
ERROR: testCtlRunDirectoryCreation (zdaemon.tests.testzdrun.TestRunnerDirectory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 328, in testCtlRunDirectoryCreation
    self.run_ctl(['-z', path, '-p', self.cmd])
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 323, in run_ctl
    proc = zdctl.ZDCmd(options)
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 147, in __init__
    self.create_rundir()
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 154, in create_rundir
    self.create_directory(self.options.directory)
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 169, in create_directory
    os.chown(directory, self.options.uid, self.options.gid)
TypeError: an integer is required

======================================================================
ERROR: testCtlRunDirectoryCreation (zdaemon.tests.testzdrun.TestRunnerDirectory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 316, in tearDown
    self.assertEqual(self.expect, got)
AssertionError: '/bin/true\n' != ''

======================================================================
ERROR: testCtlRunDirectoryCreationFromConfigFile (zdaemon.tests.testzdrun.TestRunnerDirectory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 337, in testCtlRunDirectoryCreationFromConfigFile
    self.run_ctl(['-C', config])
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 323, in run_ctl
    proc = zdctl.ZDCmd(options)
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 147, in __init__
    self.create_rundir()
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 154, in create_rundir
    self.create_directory(self.options.directory)
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 169, in create_directory
    os.chown(directory, self.options.uid, self.options.gid)
TypeError: an integer is required

======================================================================
ERROR: testCtlRunDirectoryCreationFromConfigFile (zdaemon.tests.testzdrun.TestRunnerDirectory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 316, in tearDown
    self.assertEqual(self.expect, got)
AssertionError: '/bin/true\n' != ''

======================================================================
ERROR: testCtlSocketDirectoryCreation (zdaemon.tests.testzdrun.TestRunnerDirectory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 351, in testCtlSocketDirectoryCreation
    self.run_ctl(['-s', path, '-p', self.cmd])
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 323, in run_ctl
    proc = zdctl.ZDCmd(options)
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 148, in __init__
    self.create_socket_dir()
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 160, in create_socket_dir
    self.create_directory(dir)
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 169, in create_directory
    os.chown(directory, self.options.uid, self.options.gid)
TypeError: an integer is required

======================================================================
ERROR: testCtlSocketDirectoryCreation (zdaemon.tests.testzdrun.TestRunnerDirectory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 316, in tearDown
    self.assertEqual(self.expect, got)
AssertionError: '/bin/true\n' != ''

======================================================================
ERROR: testCtlSocketDirectoryCreationFromConfigFile (zdaemon.tests.testzdrun.TestRunnerDirectory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 375, in testCtlSocketDirectoryCreationFromConfigFile
    self.run_ctl(['-C', config])
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 323, in run_ctl
    proc = zdctl.ZDCmd(options)
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 148, in __init__
    self.create_socket_dir()
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 160, in create_socket_dir
    self.create_directory(dir)
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 169, in create_directory
    os.chown(directory, self.options.uid, self.options.gid)
TypeError: an integer is required

======================================================================
ERROR: testCtlSocketDirectoryCreationFromConfigFile (zdaemon.tests.testzdrun.TestRunnerDirectory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 316, in tearDown
    self.assertEqual(self.expect, got)
AssertionError: '/bin/true\n' != ''

======================================================================
ERROR: testCtlSocketDirectoryCreationFromConfigFileRelativePath (zdaemon.tests.testzdrun.TestRunnerDirectory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 384, in testCtlSocketDirectoryCreationFromConfigFileRelativePath
    self.run_ctl(['-C', config])
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 323, in run_ctl
    proc = zdctl.ZDCmd(options)
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 148, in __init__
    self.create_socket_dir()
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 160, in create_socket_dir
    self.create_directory(dir)
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 169, in create_directory
    os.chown(directory, self.options.uid, self.options.gid)
TypeError: an integer is required

======================================================================
ERROR: testCtlSocketDirectoryCreationFromConfigFileRelativePath (zdaemon.tests.testzdrun.TestRunnerDirectory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 316, in tearDown
    self.assertEqual(self.expect, got)
AssertionError: '/bin/true\n' != ''

======================================================================
ERROR: testCtlSocketDirectoryCreationRelativePath (zdaemon.tests.testzdrun.TestRunnerDirectory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 356, in testCtlSocketDirectoryCreationRelativePath
    self.run_ctl(['-s', path, '-p', self.cmd])
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 323, in run_ctl
    proc = zdctl.ZDCmd(options)
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 148, in __init__
    self.create_socket_dir()
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 160, in create_socket_dir
    self.create_directory(dir)
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/zdctl.py", line 169, in create_directory
    os.chown(directory, self.options.uid, self.options.gid)
TypeError: an integer is required

======================================================================
ERROR: testCtlSocketDirectoryCreationRelativePath (zdaemon.tests.testzdrun.TestRunnerDirectory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/zopefoundation/zdaemon/src/zdaemon/tests/testzdrun.py", line 316, in tearDown
    self.assertEqual(self.expect, got)
AssertionError: '/bin/true\n' != ''


  Commit: 252b72c2750c409ba8554916348560a1792b6a7d
      https://github.com/zopefoundation/zdaemon/commit/252b72c2750c409ba8554916348560a1792b6a7d
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2015-04-15 (Wed, 15 Apr 2015)

  Changed paths:
    A .coveragerc
    M .gitignore

  Log Message:
  -----------
  Tweak coverage reporting to exclude test code


  Commit: f8b88a3bc56501e6a28f31c0e8948fb2d028a65b
      https://github.com/zopefoundation/zdaemon/commit/f8b88a3bc56501e6a28f31c0e8948fb2d028a65b
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2015-04-15 (Wed, 15 Apr 2015)

  Changed paths:
    M src/zdaemon/tests/testzdoptions.py

  Log Message:
  -----------
  Rename duplicate test method, fix misleading comment


  Commit: 0a9e00dfc3ede254f2eb03840783224484b84898
      https://github.com/zopefoundation/zdaemon/commit/0a9e00dfc3ede254f2eb03840783224484b84898
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2015-04-15 (Wed, 15 Apr 2015)

  Changed paths:
    M src/zdaemon/tests/tests.py

  Log Message:
  -----------
  Remove shadowed duplicate test

There were two tests named test_start_test_program, both introduced in
the same commit.  Both were passing (once I renamed them to expose the
hidden one), but one was doing less, so I removed it.


  Commit: e7b66a8f1b3245fcb172d27edd5489ad8c7929bf
      https://github.com/zopefoundation/zdaemon/commit/e7b66a8f1b3245fcb172d27edd5489ad8c7929bf
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2015-04-15 (Wed, 15 Apr 2015)

  Changed paths:
    M src/zdaemon/tests/testuser.py

  Log Message:
  -----------
  Unused import


  Commit: eef9a8553a7e9f4e6a529de51521ecf76c056d82
      https://github.com/zopefoundation/zdaemon/commit/eef9a8553a7e9f4e6a529de51521ecf76c056d82
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2015-04-15 (Wed, 15 Apr 2015)

  Changed paths:
    M src/zdaemon/zdctl.py

  Log Message:
  -----------
  Unused variable

The codebase is now pyflakes-clean.


  Commit: f3a741c8c07f0ebeaf9f3b95332d445863268d49
      https://github.com/zopefoundation/zdaemon/commit/f3a741c8c07f0ebeaf9f3b95332d445863268d49
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2015-04-15 (Wed, 15 Apr 2015)

  Changed paths:
    M src/zdaemon/__main__.py
    M src/zdaemon/tests/tests.py
    M src/zdaemon/tests/testuser.py

  Log Message:
  -----------
  Whitespace cleanup

pep8 now produces no warnings (but rather a lot of errors(


  Commit: f016b6398926beb5a8e133b5a0e853b0293db29d
      https://github.com/zopefoundation/zdaemon/commit/f016b6398926beb5a8e133b5a0e853b0293db29d
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2015-04-15 (Wed, 15 Apr 2015)

  Changed paths:
    M src/zdaemon/tests/testzdrun.py
    M src/zdaemon/zdctl.py

  Log Message:
  -----------
  Do not compare types, use 'isinstance()'


  Commit: 04e3a4595ed741afccf17561ca3490ff79bb1a79
      https://github.com/zopefoundation/zdaemon/commit/04e3a4595ed741afccf17561ca3490ff79bb1a79
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2015-04-15 (Wed, 15 Apr 2015)

  Changed paths:
    M src/zdaemon/tests/parent.py
    M src/zdaemon/tests/tests.py
    M src/zdaemon/tests/testuser.py
    M src/zdaemon/tests/testzdoptions.py
    M src/zdaemon/tests/testzdrun.py
    M src/zdaemon/zdctl.py
    M src/zdaemon/zdoptions.py
    M src/zdaemon/zdrun.py

  Log Message:
  -----------
  PEP-8


  Commit: 41a206ad1cc0dd54708b29dee9e8e23f6e527576
      https://github.com/zopefoundation/zdaemon/commit/41a206ad1cc0dd54708b29dee9e8e23f6e527576
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2015-04-15 (Wed, 15 Apr 2015)

  Changed paths:
    A setup.cfg

  Log Message:
  -----------
  Tell flake8/pyflakes to pay attention to doctests

Without this you get false positives about unused imports that are
actually used in doctests.


  Commit: 29dc2902807bff38f2f042ce3af910034aff4318
      https://github.com/zopefoundation/zdaemon/commit/29dc2902807bff38f2f042ce3af910034aff4318
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2015-04-15 (Wed, 15 Apr 2015)

  Changed paths:
    M CHANGES.rst
    M setup.py
    M src/zdaemon/tests/testzdoptions.py
    M src/zdaemon/zdctl.py
    M src/zdaemon/zdoptions.py

  Log Message:
  -----------
  Add --version command line option (#4)


Compare: https://github.com/zopefoundation/zdaemon/compare/18ec7b1afdcf...29dc2902807b


More information about the checkins mailing list