def update_groups(): """Update the Sphinx ReST files for the submodules of natu.groups. """ # Remove the existing files. files = glob('natu.groups.*.rst') for f in files: os.remove(f) # Create new files. packages = util.list_packages(groups) packages.remove('natu.groups') for package in packages: with open("%s.rst" % package, 'w') as f: f.write(TEMPLATE.format(package=package, underline='='*(len(package) + 7)))
def update_groups(): """Update the Sphinx ReST files for the submodules of natu.groups. """ # Remove the existing files. files = glob('natu.groups.*.rst') for f in files: os.remove(f) # Create new files. packages = util.list_packages(groups) packages.remove('natu.groups') for package in packages: with open("%s.rst" % package, 'w') as f: f.write( TEMPLATE.format(package=package, underline='=' * (len(package) + 7)))
# pylint: disable=I0011, C0111, R0904, W0621 import unittest import doctest import natu as thismodule from glob import glob from natu.util import list_packages from os import path THIS_DIR = path.dirname(path.realpath(__file__)) DOCTEST_FILES = [ path.basename(fname) for fname in glob(path.join(THIS_DIR, '*.txt')) ] PACKAGE_NAMES = list_packages(thismodule) # TODO: Test with complex and Fraction from Python standard library class Tests(unittest.TestCase): """Main set of unit tests """ def test_equal(self): self.assertEqual(5, 5) def test_suite(): """Return a suite of all the tests. """ print("Note: The IPython notebooks (examples/*.ipynb) must be tested "
""" # pylint: disable=I0011, C0111, R0904, W0621 import unittest import doctest import modelicares as thismodule from glob import glob from natu.util import list_packages from os import path THIS_DIR = path.dirname(path.realpath(__file__)) DOCTEST_FILES = [path.basename(fname) for fname in glob(path.join(THIS_DIR, '*.txt'))] PACKAGE_NAMES = list_packages(thismodule) PACKAGE_NAMES.remove('modelicares._gui') # TODO: Add tests here; consider moving tests from tests.txt. class Tests(unittest.TestCase): """Main set of unit tests """ def test_equal(self): self.assertEqual(5, 5) def test_suite():