File: test_dict_xml.py

package info (click to toggle)
tomoe 0.6.0-1.3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 51,396 kB
  • sloc: xml: 1,387,526; ansic: 11,515; sh: 9,072; ruby: 1,344; python: 762; makefile: 450
file content (23 lines) | stat: -rw-r--r-- 647 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# encoding: utf-8
import os
import sys
import shutil
import unittest
import test_common
import tomoe
import test_dict

class TomoeDictXMLTest(test_dict.TomoeDictTest):
    def setUp(self):
        test_dict_name = os.path.join(test_common.test_data_dir, 'test-dict.xml')
        self.dict_name = "tomoe-test-xmldict.xml"
        shutil.copy(test_dict_name, self.dict_name)
        self.dict = tomoe.Dict("XML", filename = self.dict_name, editable = True)

    def tearDown(self):
        self.dict.flush()
        self.dict = None
        if os.access(self.dict_name, os.F_OK):
            os.unlink(self.dict_name)

# vi:ts=4:nowrap:ai:expandtab