# Path: taskflow/test.py
# class GreaterThanEqual(object):
# class FailureRegexpMatcher(object):
# class ItemsEqual(object):
# class TestCase(base.BaseTestCase):
#         class ReRaiseOtherTypes(object):
#         class CaptureMatchee(object):
# class MockTestCase(TestCase):
# class CapturingLoggingHandler(logging.Handler):
#     def __init__(self, source):
#     def match(self, other):
#     def __init__(self, exc_class, pattern):
#     def match(self, failure):
#     def __init__(self, seq):
#     def match(self, other):
#     def makeTmpDir(self):
#     def assertDictEqual(self, expected, check):
#     def assertRaisesAttrAccess(self, exc_class, obj, attr_name):
#         def access_func():
#     def assertRaisesRegex(self, exc_class, pattern, callable_obj,
#                           *args, **kwargs):
#             def match(self, matchee):
#             def match(self, matchee):
#     def assertGreater(self, first, second):
#     def assertGreaterEqual(self, first, second):
#     def assertRegexpMatches(self, text, pattern):
#     def assertIsSuperAndSubsequence(self, super_seq, sub_seq, msg=None):
#     def assertFailuresRegexp(self, exc_class, pattern, callable_obj, *args,
#                              **kwargs):
#     def assertCountEqual(self, seq1, seq2, msg=None):
#     def setUp(self):
#     def patch(self, target, autospec=True, **kwargs):
#     def patchClass(self, module, name, autospec=True, attach_as=None):
#     def resetMasterMock(self):
#     def __init__(self, level=logging.DEBUG):
#     def counts(self):
#     def messages(self):
#     def exc_infos(self):
#     def emit(self, record):
#     def reset(self):
#     def close(self):
# 
# Path: taskflow/utils/misc.py
# UNKNOWN_HOSTNAME = "<unknown>"
# NUMERIC_TYPES = six.integer_types + (float,)
# _SCHEME_REGEX = re.compile(r"^([A-Za-z][A-Za-z0-9+.-]*):")
# class StrEnum(str, enum.Enum):
# class StringIO(six.StringIO):
# class BytesIO(six.BytesIO):
# class cachedproperty(object):
#     def __new__(cls, *args, **kwargs):
#     def write_nl(self, value, linesep=os.linesep):
#     def reset(self):
# def get_hostname(unknown_hostname=UNKNOWN_HOSTNAME):
# def match_type(obj, matchers):
# def countdown_iter(start_at, decr=1):
# def extract_driver_and_conf(conf, conf_key):
# def reverse_enumerate(items):
# def merge_uri(uri, conf):
# def find_subclasses(locations, base_cls, exclude_hidden=True):
# def pick_first_not_none(*values):
# def parse_uri(uri):
# def disallow_when_frozen(excp_cls):
#     def decorator(f):
#         def wrapper(self, *args, **kwargs):
# def clamp(value, minimum, maximum, on_clamped=None):
# def fix_newlines(text, replacement=os.linesep):
# def binary_encode(text, encoding='utf-8', errors='strict'):
# def binary_decode(data, encoding='utf-8', errors='strict'):
# def _check_decoded_type(data, root_types=(dict,)):
# def decode_msgpack(raw_data, root_types=(dict,)):
# def decode_json(raw_data, root_types=(dict,)):
#     def __init__(self, fget=None, require_lock=True):
#     def __call__(self, fget):
#     def __set__(self, instance, value):
#     def __delete__(self, instance):
#     def __get__(self, instance, owner):
# def millis_to_datetime(milliseconds):
# def get_version_string(obj):
# def sequence_minus(seq1, seq2):
# def as_int(obj, quiet=False):
# def capture_failure():
# def is_iterable(obj):
# def safe_copy_dict(obj):


import collections
import inspect
import random
import string
import time
import six
import testscenarios
from taskflow import test
from taskflow.utils import misc
from taskflow.utils import threading_utils
# -*- coding: utf-8 -*-

#    Copyright (C) 2012 Yahoo! Inc. All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); 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
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.





class CachedPropertyTest(test.TestCase):
    def test_attribute_caching(self):

        class A(object):
            def __init__(self):
                self.call_counter = 0


# Path: taskflow/test.py
# class GreaterThanEqual(object):
# class FailureRegexpMatcher(object):
# class ItemsEqual(object):
# class TestCase(base.BaseTestCase):
#         class ReRaiseOtherTypes(object):
#         class CaptureMatchee(object):
# class MockTestCase(TestCase):
# class CapturingLoggingHandler(logging.Handler):
#     def __init__(self, source):
#     def match(self, other):
#     def __init__(self, exc_class, pattern):
#     def match(self, failure):
#     def __init__(self, seq):
#     def match(self, other):
#     def makeTmpDir(self):
#     def assertDictEqual(self, expected, check):
#     def assertRaisesAttrAccess(self, exc_class, obj, attr_name):
#         def access_func():
#     def assertRaisesRegex(self, exc_class, pattern, callable_obj,
#                           *args, **kwargs):
#             def match(self, matchee):
#             def match(self, matchee):
#     def assertGreater(self, first, second):
#     def assertGreaterEqual(self, first, second):
#     def assertRegexpMatches(self, text, pattern):
#     def assertIsSuperAndSubsequence(self, super_seq, sub_seq, msg=None):
#     def assertFailuresRegexp(self, exc_class, pattern, callable_obj, *args,
#                              **kwargs):
#     def assertCountEqual(self, seq1, seq2, msg=None):
#     def setUp(self):
#     def patch(self, target, autospec=True, **kwargs):
#     def patchClass(self, module, name, autospec=True, attach_as=None):
#     def resetMasterMock(self):
#     def __init__(self, level=logging.DEBUG):
#     def counts(self):
#     def messages(self):
#     def exc_infos(self):
#     def emit(self, record):
#     def reset(self):
#     def close(self):
# 
# Path: taskflow/utils/misc.py
# UNKNOWN_HOSTNAME = "<unknown>"
# NUMERIC_TYPES = six.integer_types + (float,)
# _SCHEME_REGEX = re.compile(r"^([A-Za-z][A-Za-z0-9+.-]*):")
# class StrEnum(str, enum.Enum):
# class StringIO(six.StringIO):
# class BytesIO(six.BytesIO):
# class cachedproperty(object):
#     def __new__(cls, *args, **kwargs):
#     def write_nl(self, value, linesep=os.linesep):
#     def reset(self):
# def get_hostname(unknown_hostname=UNKNOWN_HOSTNAME):
# def match_type(obj, matchers):
# def countdown_iter(start_at, decr=1):
# def extract_driver_and_conf(conf, conf_key):
# def reverse_enumerate(items):
# def merge_uri(uri, conf):
# def find_subclasses(locations, base_cls, exclude_hidden=True):
# def pick_first_not_none(*values):
# def parse_uri(uri):
# def disallow_when_frozen(excp_cls):
#     def decorator(f):
#         def wrapper(self, *args, **kwargs):
# def clamp(value, minimum, maximum, on_clamped=None):
# def fix_newlines(text, replacement=os.linesep):
# def binary_encode(text, encoding='utf-8', errors='strict'):
# def binary_decode(data, encoding='utf-8', errors='strict'):
# def _check_decoded_type(data, root_types=(dict,)):
# def decode_msgpack(raw_data, root_types=(dict,)):
# def decode_json(raw_data, root_types=(dict,)):
#     def __init__(self, fget=None, require_lock=True):
#     def __call__(self, fget):
#     def __set__(self, instance, value):
#     def __delete__(self, instance):
#     def __get__(self, instance, owner):
# def millis_to_datetime(milliseconds):
# def get_version_string(obj):
# def sequence_minus(seq1, seq2):
# def as_int(obj, quiet=False):
# def capture_failure():
# def is_iterable(obj):
# def safe_copy_dict(obj):


# Path: taskflow/tests/unit/test_utils.py
import collections
import inspect
import random
import string
import time
import six
import testscenarios
from taskflow import test
from taskflow.utils import misc
from taskflow.utils import threading_utils

# -*- coding: utf-8 -*-

#    Copyright (C) 2012 Yahoo! Inc. All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); 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
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.





class CachedPropertyTest(test.TestCase):
    def test_attribute_caching(self):

        class A(object):
            def __init__(self):
                self.call_counter = 0


            @misc.cachedproperty