~mterry/duplicity/backend-unification

« back to all changes in this revision

Viewing changes to testing/unit/test_statistics.py

  • Committer: Michael Terry
  • Date: 2014-04-20 05:58:47 UTC
  • mto: This revision was merged to the branch mainline in revision 978.
  • Revision ID: michael.terry@canonical.com-20140420055847-5btxtxythvsblgpk
More reorg of testing/

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
# along with duplicity; if not, write to the Free Software Foundation,
20
20
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
21
 
22
 
import helper
23
22
import sys, unittest
24
23
 
25
24
from duplicity.statistics import * #@UnusedWildImport
26
25
from duplicity import path
27
 
 
28
 
helper.setup()
29
 
 
30
 
class StatsObjTest(unittest.TestCase):
 
26
from . import UnitTestCase
 
27
 
 
28
 
 
29
class StatsObjTest(UnitTestCase):
31
30
    """Test StatsObj class"""
32
31
    def setUp(self):
33
 
        assert not os.system("tar xzf testfiles.tar.gz > /dev/null 2>&1")
34
 
 
35
 
    def tearDown(self):
36
 
        assert not os.system("rm -rf testfiles tempdir temp2.tar")
 
32
        super(StatsObjTest, self).setUp()
 
33
        self.unpack_testfiles()
37
34
 
38
35
    def set_obj(self, s):
39
36
        """Set values of s's statistics"""