コード例 #1
0
ファイル: test_colors.py プロジェクト: CosmicFish/CosmicFish
def test_bash_colors():
    color_print = col.bash_colors()
    print 
    print color_print.header(__name__+'.test_bash_colors: Header color')
    print color_print.blue(__name__+'.test_bash_colors: Blue color')
    print color_print.green(__name__+'.test_bash_colors: Green color')
    print color_print.warning(__name__+'.test_bash_colors: Warning color')
    print color_print.fail(__name__+'.test_bash_colors: Fail color')
    print color_print.bold(__name__+'.test_bash_colors: Bold color')
    print color_print.underline(__name__+'.test_bash_colors: Underline color')
コード例 #2
0
def test_bash_colors():
    color_print = col.bash_colors()
    print()
    print(color_print.header(__name__ + '.test_bash_colors: Header color'))
    print(color_print.blue(__name__ + '.test_bash_colors: Blue color'))
    print(color_print.green(__name__ + '.test_bash_colors: Green color'))
    print(color_print.warning(__name__ + '.test_bash_colors: Warning color'))
    print(color_print.fail(__name__ + '.test_bash_colors: Fail color'))
    print(color_print.bold(__name__ + '.test_bash_colors: Bold color'))
    print(
        color_print.underline(__name__ + '.test_bash_colors: Underline color'))
コード例 #3
0
from dircache import cache
# define path to the executable and add all the relevant folders to the path where python looks for files.
here = os.path.dirname(os.path.abspath(__file__))
cosmicfish_pylib_path = here+'/..'
test_input  = here+'/test_input'
test_output = here+'/test_output'
sys.path.insert(0, os.path.normpath(cosmicfish_pylib_path))

import numpy as np
import cosmicfish_pylib.fisher_matrix as fm

from nose.tools import with_setup
from nose.tools import assert_raises

import cosmicfish_pylib.colors as fc
color_print = fc.bash_colors()

# ***************************************************************************************
    
class test_getters():

    @classmethod
    def setup_class(cls):
        print color_print.header( __name__+': test_getters.setup_class() ----------')
       
    @classmethod
    def teardown_class(cls):
        print color_print.bold( __name__+': test_getters.teardown_class() -------')

    def setup(self):
        # generate the Fisher matrix. In this case a simple diagonal matrix.
コード例 #4
0
# define path to the executable and add all the relevant folders to the path where python looks for files.
here = os.path.dirname(os.path.abspath(__file__))
cosmicfish_pylib_path = here + '/..'
test_input = here + '/test_input'
sys.path.insert(0, os.path.normpath(cosmicfish_pylib_path))

import numpy as np

import cosmicfish_pylib.fisher_matrix as fm
import cosmicfish_pylib.fisher_plot_analysis as fpa

from nose.tools import with_setup
from nose.tools import assert_raises

import cosmicfish_pylib.colors as fc
color_print = fc.bash_colors()

# ***************************************************************************************


class test_class_getters():
    @classmethod
    def setup_class(cls):
        print(
            color_print.header(
                __name__ + ': test_class_getters.setup_class() ----------'))

    @classmethod
    def teardown_class(cls):
        print(
            color_print.bold(__name__ +