# Path: pycast/common/profileme.py
# class _ProfileDecorator(object):
#     def __init__(self, filelocation):
#     def __call__(self, func):
#         def wrapped_func(*args, **kwargs):


import unittest
import os
from pycast.common.profileme import profileMe

    def profile_function_name_test(self):
        """Test the validity of __name__ for any decorated function."""

        statfile = self.statfiles[0]

        @profileMe(statfile)
        def dummy_func():
            """This is an (nearly) empty dummy function that nees to be profiled.

            The functions evaluates, if the formula for the gaussian sum is correct.
            """
            sumUpTo = 1000

            summedVals = sum(xrange(sumUpTo + 1))
            easySum = (sumUpTo * (sumUpTo + 1)) / 2

            return easySum == summedVals

        booleanVal = dummy_func()

        if not (booleanVal):
            raise AssertionError
        if not (dummy_func.__name__ == "dummy_func"):
            raise AssertionError

    def profile_doc_string_test(self):
        """Test the validity of __doc__ for any decorated function."""
        statfile = self.statfiles[0]


# Path: pycast/common/profileme.py
# class _ProfileDecorator(object):
#     def __init__(self, filelocation):
#     def __call__(self, func):
#         def wrapped_func(*args, **kwargs):


# Path: pycast/tests/profilemetest.py
import unittest
import os
from pycast.common.profileme import profileMe


    def profile_function_name_test(self):
        """Test the validity of __name__ for any decorated function."""

        statfile = self.statfiles[0]

        @profileMe(statfile)
        def dummy_func():
            """This is an (nearly) empty dummy function that nees to be profiled.

            The functions evaluates, if the formula for the gaussian sum is correct.
            """
            sumUpTo = 1000

            summedVals = sum(xrange(sumUpTo + 1))
            easySum = (sumUpTo * (sumUpTo + 1)) / 2

            return easySum == summedVals

        booleanVal = dummy_func()

        if not (booleanVal):
            raise AssertionError
        if not (dummy_func.__name__ == "dummy_func"):
            raise AssertionError

    def profile_doc_string_test(self):
        """Test the validity of __doc__ for any decorated function."""
        statfile = self.statfiles[0]


        @profileMe(statfile)