Edgewall Software

Changes between Version 1 and Version 2 of TracDev/WritingUnitTests


Ignore:
Timestamp:
Sep 25, 2014, 12:36:07 PM (10 years ago)
Author:
Jun Omae
Comment:

added encoding comment, sorted import statements, added tearDown, setUp has no arguments.

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/WritingUnitTests

    v1 v2  
    1616
    1717{{{#!py
     18# -*- coding: utf-8 -*-
     19
     20import os
     21import shutil
     22import tempfile
    1823import unittest
     24
     25from trac.test import EnvironmentStub
     26
    1927from logwatcher import api
    20 from trac.test import EnvironmentStub
    21 import tempfile
    22 import os
    2328
    2429
    2530class TestApi(unittest.TestCase):
    2631
    27     def setUp(self, port=None):
     32    def setUp(self):
    2833        self.env = EnvironmentStub(enable=[
    2934            'trac.*', 'logwatcher.api'
     
    3540        self.env.setup_log()
    3641        print 'successfully set up with env path: %s' % self.env.path
     42
     43    def tearDown(self):
     44        shutil.rmtree(self.env.path)
    3745
    3846    def test_get_logfile_name(self):