minor improvement on unit test

svn: r15377
This commit is contained in:
Jérôme Rapinat 2010-05-09 16:45:53 +00:00
parent e7a50282b4
commit 47199e72cb

View File

@ -22,28 +22,14 @@
""" Unittest for testing POTFILES.in and Makefile contents """ """ Unittest for testing POTFILES.in and Makefile contents """
# PYTHONPATH=/../src python po_test.py
import unittest import unittest
import os import os
import glob import glob
from test import test_util from test import test_util
test_util.path_append_parent() test_util.path_append_parent()
excluded_files = ["src/DataViews/_MapView.py",
"src/plugins/PHPGedViewConnector.py",
"src/plugins/phpgedview.glade",
"src/plugins/Ancestors.py",
"src/plugins/DesGraph.py",
"src/plugins/FtmStyleAncestors.py",
"src/plugins/FtmStyleDescendants.py",
"src/plugins/IndivSummary.py",
"src/date_test.py",
"src/plugins/CmdRef.py",
"src/plugins/DumpGenderStats.py",
"src/plugins/Eval.py",
"src/plugins/Leak.py",
"src/plugins/TestcaseGenerator.py"
]
def get_potfile(filename): def get_potfile(filename):
fp = open(filename, "r") fp = open(filename, "r")
retvals = [] retvals = []
@ -53,6 +39,10 @@ def get_potfile(filename):
fp.close() fp.close()
return retvals return retvals
# POTFILES.skip
excluded_files = get_potfile("../POTFILES.skip")
class TestPOT(unittest.TestCase): class TestPOT(unittest.TestCase):
potfiles = get_potfile("../POTFILES.in") potfiles = get_potfile("../POTFILES.in")
count = 1 count = 1