~ed.so/duplicity/webdav200fix-0.7

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Kenneth Loafman
  • Date: 2014-04-20 15:32:17 UTC
  • mfrom: (977.1.8 test-reorg)
  • Revision ID: kenneth@loafman.com-20140420153217-n4jt28oo4q7d6bzu
# Merged in lp:~mterry/duplicity/more-test-reorg
  - Here's another test reorganization / modernization branch. It does the
    following things:
    - Drop duplicity/misc.py. It is confusing to have both misc.py and util.py,
      and most of the code in misc.py was no longer used. I moved the one
      function that was still used into util.py.
    - Consolidated the various ways to run tests into just one. I made tox runs
      go through ./setup.py test, rather than nosetests. And I made the
      ./testing/run-tests scripts just call tox. Now we no longer need nosetests
      as a test dependency (although you can still use it if you want).
    - Added two more code quality automated tests: a pep8 one and a pylint one.
      I disabled almost all checks in each program that gave a warning. These
      tests just establish a baseline for future improvement.
    - Moved the test helper code into TestCase subclasses that all tests can
      use. And used more code sharing and setUp/tearDown cleverness to remove
      duplicated code.
    - Reorganized the tests in ./testing/tests into ./testing/functional and
      ./testing/unit -- for whether they drive duplicity as a subprocess or
      whether they import and test code directly. Each dir can have specialized
      TestCase subclasses now.
    - Renamed the files in ./testing/unit to more clearly indicate which file
      in ./duplicity they are unit testing.
    - Added some helper methods for tests to set environment and globals.*
      parameters more safely (i.e. without affecting other tests) by
      automatically cleaning up any such changes during test tearDown.
    - Removed test_unicode.py, since it is kind of dumb. It used to be more
      useful, but now with py2.6, we are just testing that one line of code
      in it is actually there.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
 
80
80
        # make symlinks for test data
81
81
        if build_cmd.build_lib != top_dir:
82
 
            for path in ['testfiles.tar.gz', 'testtar.tar', 'gnupg']:
 
82
            for path in ['testfiles.tar.gz', 'gnupg']:
83
83
                src = os.path.join(top_dir, 'testing', path)
84
84
                target = os.path.join(build_cmd.build_lib, 'testing', path)
85
85
                try:
133
133
      packages = ['duplicity',
134
134
                  'duplicity.backends',
135
135
                  'testing',
136
 
                  'testing.helpers',
137
 
                  'testing.tests'],
 
136
                  'testing.functional',
 
137
                  'testing.overrides',
 
138
                  'testing.unit'],
138
139
      package_dir = {"duplicity" : "duplicity",
139
140
                     "duplicity.backends" : "duplicity/backends",},
140
141
      ext_modules = [Extension("duplicity._librsync",
144
145
                               libraries=["rsync"])],
145
146
      scripts = ['bin/rdiffdir', 'bin/duplicity'],
146
147
      data_files = data_files,
147
 
      tests_require = ['lockfile', 'mock', 'nose', 'pexpect'],
148
 
      test_suite = 'nose.collector',
 
148
      tests_require = ['lockfile', 'mock', 'pexpect'],
 
149
      test_suite = 'testing',
149
150
      cmdclass={'test': TestCommand,
150
151
                'install': InstallCommand,
151
152
                'sdist': SDistCommand},