import os
import textwrap
import time
import unittest

import pytest
from parameterized import parameterized

from conans.model.ref import ConanFileReference
from conans.paths import CONANFILE
from conans.test.utils.tools import TestClient, TestServer, \
    NO_SETTINGS_PACKAGE_ID, GenConanfile
from conans.test.utils.scm import create_local_git_repo


class PythonExtendTest(unittest.TestCase):
    def test_with_python_requires(self):
        # https://github.com/conan-io/conan/issues/5140
        client = TestClient()
        client.save({"conanfile.py": GenConanfile().with_name("dep").with_version("0.1")})
        client.run("export . user/testing")
        conanfile = textwrap.dedent("""
            from conans import ConanFile, python_requires
            p = python_requires("dep/0.1@user/testing")
            class APck(ConanFile):