~straemer/ubuntu/quantal/update-manager/fix-for-1058070

« back to all changes in this revision

Viewing changes to janitor/plugincore/tests/test_documentation.py

  • Committer: Package Import Robot
  • Author(s): Michael Terry
  • Date: 2012-06-29 10:59:30 UTC
  • mfrom: (389.1.2 precise-security)
  • Revision ID: package-import@ubuntu.com-20120629105930-0oaj9vdvykmvkjum
Tags: 1:0.165
* Implementation of "update on start" feature from spec
  https://wiki.ubuntu.com/SoftwareUpdates
* Use a single main window that changes instead of having modal dialogs
* Implement several special-purpose dialogs like "No updates" or
  "Dist upgrade needed" accordingn to the above spec
* Split out release upgrader code and DistUpgrade module into a separate
  source package
* Drop python-update-manager, as it is unused
* debian/tests:
  - Add dep8 tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (C) 2008-2012  Canonical, Ltd.
 
2
# -*- Mode: Python; indent-tabs-mode: nil; tab-width: 4; coding: utf-8 -*-
2
3
#
3
4
# This program is free software: you can redistribute it and/or modify it
4
5
# under the terms of the GNU General Public License as published by the Free
20
21
__metaclass__ = type
21
22
__all__ = [
22
23
    'additional_tests',
23
 
    ]
24
 
 
 
24
]
25
25
 
26
26
import os
27
27
import atexit
31
31
from pkg_resources import (
32
32
    resource_filename, resource_exists, resource_listdir, cleanup_resources)
33
33
 
34
 
 
35
34
COMMASPACE = ', '
36
35
DOT = '.'
37
36
DOCTEST_FLAGS = (
44
43
WHOAMI = 'janitor.plugincore'
45
44
 
46
45
 
47
 
 
48
46
def stop():
49
47
    """Call into pdb.set_trace()"""
50
48
    # Do the import here so that you get the wacky special hacked pdb instead
53
51
    pdb.set_trace()
54
52
 
55
53
 
56
 
 
57
54
def setup(testobj):
58
55
    """Test setup."""
59
56
    # Make sure future statements in our doctests match the Python code.
72
69
        cleanup()
73
70
 
74
71
 
75
 
 
76
72
def additional_tests():
77
73
    "Run the doc tests (README.rst and docs/*, if any exist)"
78
74
    doctest_files = [
79
75
        ## os.path.abspath(resource_filename(WHOAMI, 'README.rst')),
80
 
        ]
 
76
    ]
81
77
    if resource_exists(WHOAMI, 'docs'):
82
78
        for name in resource_listdir(WHOAMI, 'docs'):
83
79
            if name.endswith('.rst'):