49 lines
1.3 KiB
Python
49 lines
1.3 KiB
Python
"""
|
|
@package tests.test_hbncu
|
|
unit tests for projects.hbncu
|
|
|
|
the purpose of these tests is to help debugging the code.
|
|
|
|
to run the tests, change to the directory which contains the tests directory, and execute =nosetests=.
|
|
|
|
@pre nose must be installed (python-nose package on Debian).
|
|
|
|
@author Matthias Muntwiler, matthias.muntwiler@psi.ch
|
|
|
|
@copyright (c) 2015 by Paul Scherrer Institut @n
|
|
Licensed under the Apache License, Version 2.0 (the "License"); @n
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
"""
|
|
|
|
import unittest
|
|
import os.path
|
|
import tempfile
|
|
import shutil
|
|
import numpy as np
|
|
import projects.hbncu.hbncu as hbncu
|
|
import pmsco.data as data
|
|
import pmsco.dispatch as dispatch
|
|
|
|
|
|
class TestHbncuProject(unittest.TestCase):
|
|
def setUp(self):
|
|
self.test_dir = tempfile.mkdtemp()
|
|
self.project = hbncu.HbncuProject()
|
|
|
|
def tearDown(self):
|
|
# after each test method
|
|
self.project = None
|
|
shutil.rmtree(self.test_dir)
|
|
|
|
@classmethod
|
|
def setup_class(cls):
|
|
# before any methods in this class
|
|
pass
|
|
|
|
@classmethod
|
|
def teardown_class(cls):
|
|
# teardown_class() after any methods in this class
|
|
pass
|