~ubuntu-branches/debian/squeeze/nose/squeeze

« back to all changes in this revision

Viewing changes to unit_tests/test_ls_tree.rst

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Marek, Torsten Marek, Gustavo Noronha Silva
  • Date: 2008-06-12 13:39:43 UTC
  • mfrom: (1.2.1 upstream) (2.1.5 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080612133943-2q7syp67fwl4on13
Tags: 0.10.3-1

[Torsten Marek]
* New upstream release (Closes: #461994)
* debian/control
  - bump standards version to 3.8.0, no changes necessary
  - add suggestions for python-coverage (Closes: #457053)
  - change dependency on python-setuptools into 
    python-pkg-resources (Closes: #468719)
  - added myself to uploaders

[Gustavo Noronha Silva]
* debian/control:
  - remove -1 from build-dep on setuptools

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
    >>> import os
 
2
    >>> import tempfile
 
3
    >>> import shutil
 
4
 
 
5
    >>> from nose.util import ls_tree
 
6
 
 
7
    >>> dir_path = tempfile.mkdtemp()
 
8
 
 
9
    >>> def create_file(filename):
 
10
    ...     fd = os.open(filename, os.O_WRONLY|os.O_CREAT, 0666)
 
11
    ...     os.close(fd)
 
12
 
 
13
    >>> os.mkdir(os.path.join(dir_path, "top"))
 
14
    >>> os.mkdir(os.path.join(dir_path, "top/dir"))
 
15
    >>> os.mkdir(os.path.join(dir_path, "top/dir2"))
 
16
    >>> os.mkdir(os.path.join(dir_path, "top/dir3"))
 
17
    >>> os.mkdir(os.path.join(dir_path, "top/dir/dir"))
 
18
    >>> os.mkdir(os.path.join(dir_path, "top/dir/dir2"))
 
19
    >>> os.mkdir(os.path.join(dir_path, "top/.svn"))
 
20
    >>> os.mkdir(os.path.join(dir_path, "top/.notsvn"))
 
21
    >>> os.mkdir(os.path.join(dir_path, "top/dir/.svn"))
 
22
    >>> os.mkdir(os.path.join(dir_path, "top/dir/.notsvn"))
 
23
    >>> create_file(os.path.join(dir_path, "top/file"))
 
24
    >>> create_file(os.path.join(dir_path, "top/backup_file~"))
 
25
    >>> create_file(os.path.join(dir_path, "top/file2"))
 
26
    >>> create_file(os.path.join(dir_path, "top/dir/file"))
 
27
    >>> create_file(os.path.join(dir_path, "top/dir/dir/file"))
 
28
    >>> create_file(os.path.join(dir_path, "top/dir/dir/file2"))
 
29
    >>> create_file(os.path.join(dir_path, "top/dir/backup_file~"))
 
30
    >>> create_file(os.path.join(dir_path, "top/dir2/file"))
 
31
 
 
32
    Note that files matching skip_pattern (by default SVN files,
 
33
    backup files and compiled Python files) are ignored
 
34
 
 
35
    >>> print ls_tree(os.path.join(dir_path, "top"))
 
36
    |-- file
 
37
    |-- file2
 
38
    |-- .notsvn
 
39
    |-- dir
 
40
    |   |-- file
 
41
    |   |-- .notsvn
 
42
    |   |-- dir
 
43
    |   |   |-- file
 
44
    |   |   `-- file2
 
45
    |   `-- dir2
 
46
    |-- dir2
 
47
    |   `-- file
 
48
    `-- dir3
 
49
 
 
50
    >>> shutil.rmtree(dir_path)