Skip to content

Commit

Permalink
Some test doc additions.
Browse files Browse the repository at this point in the history
  • Loading branch information
dotsdl committed Sep 8, 2015
1 parent 6a5294d commit 9351af2
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions datreant/tests/test_treants.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,24 @@ def test_init(self, treant, tmpdir):
def test_gen_methods(self, tmpdir):
"""Test the variety of ways we can generate a new Treant
1. `Treant('treant')`, where 'treant' is not an existing file or
1. ``Treant('treant')``, where 'treant' is not an existing file or
directory path
2. `Treant('treant')`, where 'treant' is an existing
directory without Treant state files inside
2. ``Treant('treant')``, where 'treant' is an existing directory
without Treant state files inside
3. `Treant('/somedir/treant')`, where 'treant' is not an existing
3. ``Treant('/somedir/treant')``, where 'treant' is not an existing
file or directory in 'somedir'
4. `Treant('/somedir/treant')`, where 'treant' is an existing directory
in 'somedir' without any Treant state files inside
4. ``Treant('/somedir/treant')``, where 'treant' is an existing
directory in 'somedir' without any Treant state files inside
5. `Treant('somedir/treant', new=True)`, where 'treant' is an existing
directory in 'somedir' with an existing Treant statefile
5. ``Treant('somedir/treant', new=True)``, where 'treant' is an
existing directory in 'somedir' with an existing Treant statefile
6. `Treant('/somedir/treant')`, where 'treant' is an existing directory
in 'somedir' with other types of Treant files inside (such as Group)
6. ``Treant('/somedir/treant')``, where 'treant' is an existing
directory in 'somedir' with other types of Treant files inside (such
as Group)
"""
with tmpdir.as_cwd():
Expand Down Expand Up @@ -106,6 +107,12 @@ def test_regen(self, tmpdir):
def test_regen_methods(self, tmpdir):
"""Test the variety of ways Treants can be regenerated.
1. ``Treant('treant')``, where there exists *only one* ``Treant`` state
file inside 'treant'
2. ``Treant('treant/Treant.<uuid>.<ext>')``, where there need not be
only a single ``Treant`` state file in 'treant'
"""
with tmpdir.as_cwd():
t1 = self.treantclass('newone')
Expand Down

0 comments on commit 9351af2

Please sign in to comment.