def testCleanUp(self):
        makedirs(join(self.tempdir, "folder"))
        pycFile = join(self.tempdir, "folder", "blah.pyc")
        pyFile = join(self.tempdir, "folder", "blah.py")
        for f in [pyFile, pycFile]:
            open(f, "w").write("")
        self.assertTrue(isfile(pyFile))
        self.assertTrue(isfile(pycFile))

        cleanup(self.tempdir)
        self.assertTrue(isfile(pyFile))
        self.assertFalse(isfile(pycFile))
Exemple #2
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with "Meresco Harvester"; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
## end license ##

from os import getuid
assert getuid() != 0, "Do not run tests as 'root'"

from seecrdeps import includeParentAndDeps, cleanup     #DO_NOT_DISTRIBUTE
includeParentAndDeps(__file__)                          #DO_NOT_DISTRIBUTE
cleanup(__file__)                                       #DO_NOT_DISTRIBUTE

import unittest

from deleteidstest import DeleteIdsTest
from eventloggertest import EventLoggerTest
from filesystemuploadtest import FileSystemUploaderTest
from harvestactiontest import HarvestActionTest
from harvesterdataactionstest import HarvesterDataActionsTest
from harvesterdataretrievetest import HarvesterDataRetrieveTest
from harvesterdatatest import HarvesterDataTest
from harvesterlogtest import HarvesterLogTest
from harvestertest import HarvesterTest
from idstest import IdsTest
from internalserverproxytest import InternalServerProxyTest
from mappingtest import MappingTest
Exemple #3
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with "Meresco Oai Common"; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
## end license ##

from os import getuid
assert getuid() != 0, "Do not run tests as 'root'"

from seecrdeps import includeParentAndDeps, cleanup     #DO_NOT_DISTRIBUTE
includeParentAndDeps(__file__, scanForDeps=True)        #DO_NOT_DISTRIBUTE
cleanup(__file__)                                       #DO_NOT_DISTRIBUTE

import unittest
from warnings import simplefilter
simplefilter('default')

from oaidownloadprocessortest import OaiDownloadProcessorTest
from partitiontest import PartitionTest
from resumptiontokentest import ResumptionTokenTest
from stamptest import StampTest
from updateadaptertest import UpdateAdapterTest

from tools.iterateoaipmhtest import IterateOaiPmhTest

if __name__ == '__main__':
    unittest.main()