コード例 #1
0
ファイル: webapp.py プロジェクト: yankang84/cyclus
def make_parser():
    p = ArgumentParser('webapp')
    p.add_argument('-d', '--dir', dest='d',
                   default=os.path.join(Env().install_path, 'share',
                                        'cyclus', 'webapp'),
                   help='directory to host.')
    return p
コード例 #2
0
import sqlite3
import platform

import tables
import numpy as np
from numpy.testing import assert_array_almost_equal
from numpy.testing import assert_almost_equal
from cyclus.lib import Env

from nose.plugins.skip import SkipTest
from nose.tools import assert_equal, assert_true

import helper
from helper import check_cmd, run_cyclus, table_exist, cyclus_has_coin

ALLOW_MILPS = Env().allow_milps


def skip_if_dont_allow_milps():
    """A don't run certain tests if MILPs are disabled."""
    if not ALLOW_MILPS:
        raise SkipTest("Cyclus was compiled without MILPS support or the "
                       "ALLOW_MILPS env var was not set to true.")


class TestRegression(object):
    """A base class for all regression tests. A derived class is required for
    each new input file to be tested. Each derived class *must* declare an `inf`
    member in their `__init__` function that points to the input file to be
    tested, e.g., `self.inf_ = ./path/to/my/input_file.xml. See below for
    examples.
コード例 #3
0
ファイル: main.py プロジェクト: the45545512/cyclus
 def __call__(self, parser, ns, values, option_string=None):
     s = Env().nuc_data
     print(s)
コード例 #4
0
ファイル: main.py プロジェクト: the45545512/cyclus
 def __call__(self, parser, ns, values, option_string=None):
     s = Env().build_path
     print(s)
コード例 #5
0
ファイル: main.py プロジェクト: the45545512/cyclus
 def __call__(self, parser, ns, values, option_string=None):
     s = os.path.join(Env().install_path, "share", "cyclus", "cmake")
     print(s)
コード例 #6
0
ファイル: main.py プロジェクト: the45545512/cyclus
 def __call__(self, parser, ns, values, option_string=None):
     cp = Env().cyclus_path
     s = os.pathsep.join(cp)
     print(s)