# Path: binstar_client/utils/test/utils.py
# def example_path(example):
#     return os.path.join(os.path.dirname(__file__),
#                         '../../../example-packages',
#                         example)
# 
# Path: binstar_client/utils/detect.py
# def is_project(filename):
#     logger.debug("Testing if project ..")
# 
#     def is_python_file():
#         return filename.endswith('.py')
# 
#     def is_directory():
#         return path.isdir(filename)
# 
#     if is_directory() or is_python_file():
#         return True
#     logger.debug("Not a project")


import unittest
from binstar_client.utils.test.utils import example_path
from binstar_client.utils.detect import is_project


class IsProjectTestCase(unittest.TestCase):
    def test_python_file(self):
        is_project(example_path('bokeh-apps/timeout.py'))

    def test_dir_project(self):

# Path: binstar_client/utils/test/utils.py
# def example_path(example):
#     return os.path.join(os.path.dirname(__file__),
#                         '../../../example-packages',
#                         example)
# 
# Path: binstar_client/utils/detect.py
# def is_project(filename):
#     logger.debug("Testing if project ..")
# 
#     def is_python_file():
#         return filename.endswith('.py')
# 
#     def is_directory():
#         return path.isdir(filename)
# 
#     if is_directory() or is_python_file():
#         return True
#     logger.debug("Not a project")


# Path: binstar_client/utils/test/test_detect.py
import unittest
from binstar_client.utils.test.utils import example_path
from binstar_client.utils.detect import is_project



class IsProjectTestCase(unittest.TestCase):
    def test_python_file(self):
        is_project(example_path('bokeh-apps/timeout.py'))

    def test_dir_project(self):

        is_project(example_path('bokeh-apps/weather'))