Module ImportFrom alias Import alias Import alias ImportFrom alias Import alias Import alias Import alias Import alias ImportFrom alias alias alias alias ImportFrom alias Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Call NameLoad Call NameLoad Call NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore TupleLoad Str Str Str Str Str Str Str Str Str Str FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call NameLoad NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Call NameLoad Call NameLoad NameLoad Str attr decorator_list FunctionDef arguments args defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Str Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Num decorator_list Assign NameStore NameLoad decorator_list FunctionDef arguments args defaults vararg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If BoolOpOr CompareNotEq AttributeLoad NameLoad attr Str CompareIsNot NameLoad AttributeLoad NameLoad attr body Raise Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assert Call NameLoad NameLoad NameLoad Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults body Assign NameStore Str If NameLoad body Assign NameStore Str Assign NameStore Call NameLoad BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TryFinally body TryExcept body Return Call NameLoad NameLoad NameLoad handlers ExceptHandler body Expr Call NameLoad BinOpMod Str NameLoad keyword AttributeLoad NameLoad attr Assign NameStore NameLoad Raise finalbody Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert Call NameLoad NameLoad NameLoad Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Delete NameDel Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore Call NameLoad Call NameLoad TryExcept body Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad keyword Str keyword Str keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Num handlers ExceptHandler type NameLoad body Assign NameStore NameLoad TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call NameLoad Call NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Str AugAssignAdd NameStore BinOpMod Str NameLoad Raise Call NameLoad NameLoad orelse Assign NameStore Str AugAssignAdd NameStore Str AugAssignAdd NameStore Str AugAssignMod NameStore NameLoad Raise Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TryFinally body TryExcept body Return Call NameLoad NameLoad NameLoad NameLoad handlers ExceptHandler body Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr Assign NameStore NameStore NameLoad Raise finalbody If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list
N/A __future__ print_function N/A os N/A sys unittest TestCase N/A time N/A tempfile N/A shutil N/A io git Repo Remote GitCommandError Git git.compat string_types N/A osp N/A N/A os path dirname N/A GIT_REPO N/A N/A N/A os environ get GIT_PYTHON_TEST_GIT_REPO_BASE N/A osp N/A osp N/A osp N/A osp __file__ N/A GIT_DAEMON_PORT N/A N/A N/A os environ get GIT_PYTHON_TEST_GIT_DAEMON_PORT 9418 N/A __all__ N/A fixture_path fixture absolute_project_path StringProcessAdapter with_rw_repo with_rw_and_rw_remote_repo TestBase TestCase GIT_REPO GIT_DAEMON_PORT fixture_path N/A N/A name N/A N/A N/A test_dir N/A osp N/A osp __file__ N/A N/A N/A N/A os path join test_dir fixtures name N/A fixture N/A N/A name N/A N/A N/A N/A N/A N/A open N/A fixture_path name rb read N/A absolute_project_path N/A N/A N/A N/A N/A N/A N/A N/A os path abspath N/A N/A N/A os path join N/A osp __file__ .. .. N/A StringProcessAdapter N/A object N/A N/A Allows to use strings as Process object as returned by SubProcess.Popen.
    Its tailored to work with the test system only __init__ N/A N/A self input_string N/A N/A N/A N/A self stdout N/A N/A io BytesIO input_string N/A N/A self stderr N/A N/A io BytesIO N/A wait N/A N/A self N/A N/A N/A 0 N/A N/A poll wait N/A _mktemp N/A N/A N/A args N/A N/A Wrapper around default tempfile.mktemp to fix an osx issue
    :note: the OSX special case was removed as it was unclear why that was needed in the first place. It seems
    to be just fine without it. However, if we leave this special case, and if TMPDIR is set to something custom,
    prefixing /private/ will lead to incorrect paths on OSX. N/A tdir N/A N/A tempfile mktemp args N/A tdir N/A _rmtree_onerror N/A N/A osremove fullpath exec_info N/A N/A N/A 
    Handle the case on windows that read-only files cannot be deleted by
    os.remove by setting it to mode 777, then retry deletion.
     N/A N/A N/A N/A os name nt N/A osremove N/A os remove N/A N/A N/A N/A N/A os chmod fullpath 511 N/A N/A N/A os remove fullpath N/A with_rw_repo N/A N/A working_tree_ref bare N/A False N/A N/A 
    Same as with_bare_repo, but clones the rorepo as non-bare repository, checking
    out the working tree at the given working_tree_ref.

    This repository type is more costly due to the working copy checkout.

    To make working with relative paths easier, the cwd will be set to the working
    dir of the repository.
     N/A N/A isinstance working_tree_ref string_types Decorator requires ref name for working tree checkout argument_passer N/A N/A func N/A N/A repo_creator N/A N/A self N/A N/A N/A prefix non_ N/A bare N/A N/A prefix N/A repo_dir N/A _mktemp N/A %sbare_%s N/A prefix N/A func __name__ N/A rw_repo N/A N/A N/A self rorepo clone repo_dir shared True bare bare n True N/A N/A N/A rw_repo head commit N/A N/A rw_repo commit working_tree_ref N/A N/A bare N/A N/A N/A N/A N/A N/A rw_repo head reference checkout N/A prev_cwd N/A N/A os getcwd N/A N/A N/A os chdir N/A rw_repo working_dir N/A N/A N/A N/A N/A N/A func self rw_repo N/A N/A N/A N/A N/A print N/A Keeping repo after failure: %s repo_dir file N/A sys stderr N/A repo_dir None N/A N/A N/A N/A N/A os chdir prev_cwd N/A N/A N/A N/A rw_repo git clear_cache N/A N/A repo_dir None N/A N/A N/A N/A shutil rmtree repo_dir onerror _rmtree_onerror N/A N/A N/A repo_creator __name__ N/A func __name__ N/A repo_creator N/A N/A argument_passer N/A with_rw_and_rw_remote_repo N/A N/A working_tree_ref N/A N/A N/A 
    Same as with_rw_repo, but also provides a writable remote repository from which the
    rw_repo has been forked as well as a handle for a git-daemon that may be started to
    run the remote_repo.
    The remote repository was cloned as bare repository from the rorepo, wheras
    the rw repo has a working tree and was cloned from the remote repository.

    remote_repo has two remotes: origin and daemon_origin. One uses a local url,
    the other uses a server url. The daemon setup must be done on system level
    and should be an inetd service that serves tempdir.gettempdir() and all
    directories in it.

    The following scetch demonstrates this::
     rorepo ---<bare clone>---> rw_remote_repo ---<clone>---> rw_repo

    The test case needs to support the following signature::
        def case(self, rw_repo, rw_remote_repo)

    This setup allows you to test push and pull scenarios and hooks nicely.

    See working dir info in with_rw_repo
    :note: We attempt to launch our own invocation of git-daemon, which will be shutdown at the end of the test.
     N/A N/A isinstance working_tree_ref string_types Decorator requires ref name for working tree checkout argument_passer N/A N/A func N/A N/A remote_repo_creator N/A N/A self N/A N/A N/A remote_repo_dir N/A _mktemp N/A remote_repo_%s N/A func __name__ N/A repo_dir N/A _mktemp remote_clone_non_bare_repo N/A rw_remote_repo N/A N/A N/A self rorepo clone remote_repo_dir shared True bare True N/A rw_repo N/A N/A rw_remote_repo clone repo_dir shared True bare False n True N/A N/A N/A rw_repo head commit working_tree_ref N/A N/A N/A N/A N/A rw_repo head reference checkout N/A N/A rw_remote_repo daemon_export True N/A crw N/A N/A rw_remote_repo config_writer N/A section daemon N/A N/A N/A N/A N/A crw add_section section N/A N/A N/A Exception N/A N/A N/A N/A N/A crw set section receivepack True N/A N/A N/A crw release N/A crw N/A d_remote N/A N/A Remote create rw_repo daemon_origin remote_repo_dir N/A N/A N/A d_remote fetch N/A remote_repo_url N/A git://localhost:%s%s N/A GIT_DAEMON_PORT remote_repo_dir N/A N/A N/A N/A d_remote config_writer set url remote_repo_url N/A temp_dir N/A osp N/A _mktemp N/A N/A N/A gd N/A N/A N/A Git daemon temp_dir enable receive-pack listen 127.0.0.1 port GIT_DAEMON_PORT as_process True N/A N/A N/A time sleep 0.5 N/A N/A N/A Exception N/A N/A gd None N/A N/A N/A N/A N/A N/A rw_repo git ls_remote d_remote N/A N/A N/A GitCommandError N/A e N/A N/A N/A gd None N/A N/A N/A N/A os kill N/A N/A gd proc pid 15 N/A N/A print N/A str e N/A N/A N/A os name nt N/A N/A msg git-daemon needs to run this test, but windows does not have one.  N/A msg N/A Otherwise, run: git-daemon "%s" temp_dir N/A N/A AssertionError msg N/A N/A msg Please start a git-daemon to run this test, execute: git daemon --enable=receive-pack "%s" N/A msg You can also run the daemon on a different port by passing --port=<port> N/A msg and setting the environment variable GIT_PYTHON_TEST_GIT_DAEMON_PORT to <port> N/A msg temp_dir N/A N/A AssertionError msg N/A prev_cwd N/A N/A os getcwd N/A N/A N/A os chdir N/A rw_repo working_dir N/A N/A N/A N/A N/A N/A func self rw_repo rw_remote_repo N/A N/A N/A N/A N/A print N/A Keeping repos after failure: repo_dir = %s, remote_repo_dir = %s N/A repo_dir remote_repo_dir file N/A sys stderr N/A repo_dir remote_repo_dir None N/A N/A N/A N/A gd None N/A N/A N/A N/A os kill N/A N/A gd proc pid 15 N/A N/A N/A os chdir prev_cwd N/A N/A N/A N/A rw_repo git clear_cache N/A N/A N/A N/A rw_remote_repo git clear_cache N/A repo_dir N/A N/A N/A N/A shutil rmtree repo_dir onerror _rmtree_onerror N/A remote_repo_dir N/A N/A N/A N/A shutil rmtree remote_repo_dir onerror _rmtree_onerror N/A N/A gd None N/A N/A N/A N/A N/A gd proc wait N/A N/A N/A remote_repo_creator __name__ N/A func __name__ N/A remote_repo_creator N/A N/A argument_passer N/A TestBase N/A TestCase N/A N/A 
    Base Class providing default functionality to all tests such as:

    - Utility functions provided by the TestCase base of the unittest method such as::
        self.fail("todo")
        self.failUnlessRaises(...)

    - Class level repository which is considered read-only as it is shared among
      all test cases in your type.
      Access it using::
       self.rorepo  # 'ro' stands for read-only

      The rorepo is in fact your current project's git repo. If you refer to specific
      shas for your objects, be sure you choose some that are part of the immutable portion
      of the project history ( to assure tests don't fail for others ).
     _small_repo_url N/A N/A self N/A N/A N/A :return" a path to a small, clonable repository N/A N/A N/A N/A os path join N/A N/A self rorepo working_tree_dir git/ext/gitdb/gitdb/ext/smmap N/A setUpClass N/A N/A cls N/A N/A N/A 
        Dynamically add a read-only repository to our actual type. This way
        each test type has its own repository
         N/A N/A cls rorepo N/A Repo GIT_REPO N/A classmethod tearDownClass N/A N/A cls N/A N/A N/A N/A N/A N/A N/A cls rorepo git clear_cache N/A N/A N/A cls rorepo git None N/A classmethod _make_file N/A N/A self rela_path data repo N/A None N/A N/A 
        Create a file at the given path relative to our repository, filled
        with the given data. Returns absolute path to created file.
         N/A repo N/A repo N/A self rorepo N/A abs_path N/A N/A N/A os path join N/A repo working_tree_dir rela_path N/A fp N/A open abs_path w N/A N/A N/A fp write data N/A N/A N/A fp close N/A abs_path N/A N/A