aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2010-05-27 19:56:06 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2010-05-27 19:56:06 -0300
commit6023a1e4aafbc2aa7062451693fccfe5a5b5572b (patch)
tree3a655c8ef1f8d77bff04399ca45beae697df14fb /tests/test_description_tree.py
parentAdded tests to g_octave/description_tree.py (tests/test_description_tree.py) (diff)
downloadg-octave-6023a1e4aafbc2aa7062451693fccfe5a5b5572b.tar.gz
g-octave-6023a1e4aafbc2aa7062451693fccfe5a5b5572b.tar.bz2
g-octave-6023a1e4aafbc2aa7062451693fccfe5a5b5572b.zip
moved the snippet of code that creates a "fake" DESCRIPTION tree from tests/test_description_tree.py to
tests/utils.py, because this will be used by another test suite.
Diffstat (limited to 'tests/test_description_tree.py')
-rw-r--r--tests/test_description_tree.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/tests/test_description_tree.py b/tests/test_description_tree.py
index 0eb305c..a8f0d50 100644
--- a/tests/test_description_tree.py
+++ b/tests/test_description_tree.py
@@ -13,8 +13,8 @@
import os
import shutil
-import tempfile
import unittest
+import utils
from g_octave import description, description_tree
@@ -30,19 +30,7 @@ class TestDescriptionTree(unittest.TestCase):
]
def setUp(self):
- description_file = os.path.join(
- os.path.dirname(os.path.abspath(__file__)), 'DESCRIPTION'
- )
-
- # creating a temporary DESCRIPTION's tree
- self._tree_dir = tempfile.mkdtemp()
- for cat, pkg, ver in self._packages:
- temp_path = os.path.join(self._tree_dir, cat, pkg+'-'+ver)
- os.makedirs(temp_path)
- shutil.copy(
- description_file,
- os.path.join(temp_path, 'DESCRIPTION')
- )
+ self._tree_dir = utils.create_description_tree(self._packages)
self._tree = description_tree.DescriptionTree(self._tree_dir)
def test_temptree(self):