Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove unnecessary files

  • Loading branch information...
commit ce19419605c0f90b50b255c85caa6d3eb66b1de3 1 parent 0d23159
Jeremy Aldrich authored
Showing with 0 additions and 24,137 deletions.
  1. +0 −1  env/.Python
  2. +0 −76 env/bin/activate
  3. +0 −32 env/bin/activate.csh
  4. +0 −79 env/bin/activate.fish
  5. +0 −32 env/bin/activate_this.py
  6. +0 −9 env/bin/easy_install
  7. +0 −9 env/bin/easy_install-2.7
  8. +0 −9 env/bin/nosetests
  9. +0 −9 env/bin/nosetests-2.7
  10. +0 −9 env/bin/pep8
  11. +0 −9 env/bin/pip
  12. +0 −9 env/bin/pip-2.7
  13. BIN  env/bin/python
  14. +0 −1  env/bin/python2.7
  15. +0 −1  env/include/python2.7
  16. +0 −1  env/lib/python2.7/UserDict.py
  17. +0 −1  env/lib/python2.7/_abcoll.py
  18. +0 −1  env/lib/python2.7/_weakrefset.py
  19. +0 −1  env/lib/python2.7/abc.py
  20. +0 −1  env/lib/python2.7/codecs.py
  21. +0 −1  env/lib/python2.7/config
  22. +0 −1  env/lib/python2.7/copy_reg.py
  23. +0 −97 env/lib/python2.7/distutils/__init__.py
  24. +0 −6 env/lib/python2.7/distutils/distutils.cfg
  25. +0 −1  env/lib/python2.7/encodings
  26. +0 −1  env/lib/python2.7/fnmatch.py
  27. +0 −1  env/lib/python2.7/genericpath.py
  28. +0 −1  env/lib/python2.7/lib-dynload
  29. +0 −1  env/lib/python2.7/linecache.py
  30. +0 −1  env/lib/python2.7/locale.py
  31. 0  env/lib/python2.7/no-global-site-packages.txt
  32. +0 −1  env/lib/python2.7/ntpath.py
  33. +0 −1  env/lib/python2.7/orig-prefix.txt
  34. +0 −1  env/lib/python2.7/os.py
  35. +0 −1  env/lib/python2.7/posixpath.py
  36. +0 −1  env/lib/python2.7/re.py
  37. +0 −5 env/lib/python2.7/site-packages/easy-install.pth
  38. +0 −38 env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/PKG-INFO
  39. +0 −52 env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/SOURCES.txt
  40. +0 −1  env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/dependency_links.txt
  41. +0 −7 env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/entry_points.txt
  42. +0 −99 env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/installed-files.txt
  43. +0 −1  env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/not-zip-safe
  44. +0 −1  env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/top_level.txt
  45. +0 −15 env/lib/python2.7/site-packages/nose/__init__.py
  46. +0 −397 env/lib/python2.7/site-packages/nose/case.py
  47. +0 −146 env/lib/python2.7/site-packages/nose/commands.py
  48. +0 −638 env/lib/python2.7/site-packages/nose/config.py
  49. +0 −324 env/lib/python2.7/site-packages/nose/core.py
  50. +0 −9 env/lib/python2.7/site-packages/nose/exc.py
  51. +0 −3  env/lib/python2.7/site-packages/nose/ext/__init__.py
  52. +0 −2,272 env/lib/python2.7/site-packages/nose/ext/dtcompat.py
  53. +0 −39 env/lib/python2.7/site-packages/nose/failure.py
  54. +0 −154 env/lib/python2.7/site-packages/nose/importer.py
  55. +0 −207 env/lib/python2.7/site-packages/nose/inspector.py
  56. +0 −595 env/lib/python2.7/site-packages/nose/loader.py
  57. +0 −190 env/lib/python2.7/site-packages/nose/plugins/__init__.py
  58. +0 −45 env/lib/python2.7/site-packages/nose/plugins/allmodules.py
  59. +0 −286 env/lib/python2.7/site-packages/nose/plugins/attrib.py
  60. +0 −728 env/lib/python2.7/site-packages/nose/plugins/base.py
  61. +0 −34 env/lib/python2.7/site-packages/nose/plugins/builtin.py
  62. +0 −128 env/lib/python2.7/site-packages/nose/plugins/capture.py
  63. +0 −94 env/lib/python2.7/site-packages/nose/plugins/collect.py
  64. +0 −308 env/lib/python2.7/site-packages/nose/plugins/cover.py
  65. +0 −62 env/lib/python2.7/site-packages/nose/plugins/debug.py
  66. +0 −45 env/lib/python2.7/site-packages/nose/plugins/deprecated.py
  67. +0 −428 env/lib/python2.7/site-packages/nose/plugins/doctests.py
  68. +0 −210 env/lib/python2.7/site-packages/nose/plugins/errorclass.py
  69. +0 −43 env/lib/python2.7/site-packages/nose/plugins/failuredetail.py
  70. +0 −103 env/lib/python2.7/site-packages/nose/plugins/isolate.py
  71. +0 −236 env/lib/python2.7/site-packages/nose/plugins/logcapture.py
  72. +0 −446 env/lib/python2.7/site-packages/nose/plugins/manager.py
  73. +0 −798 env/lib/python2.7/site-packages/nose/plugins/multiprocess.py
  74. +0 −416 env/lib/python2.7/site-packages/nose/plugins/plugintest.py
  75. +0 −154 env/lib/python2.7/site-packages/nose/plugins/prof.py
  76. +0 −56 env/lib/python2.7/site-packages/nose/plugins/skip.py
  77. +0 −306 env/lib/python2.7/site-packages/nose/plugins/testid.py
  78. +0 −253 env/lib/python2.7/site-packages/nose/plugins/xunit.py
  79. +0 −191 env/lib/python2.7/site-packages/nose/proxy.py
  80. +0 −130 env/lib/python2.7/site-packages/nose/pyversion.py
  81. +0 −200 env/lib/python2.7/site-packages/nose/result.py
  82. +0 −251 env/lib/python2.7/site-packages/nose/selector.py
  83. +0 −1  env/lib/python2.7/site-packages/nose/sphinx/__init__.py
  84. +0 −186 env/lib/python2.7/site-packages/nose/sphinx/pluginopts.py
  85. +0 −607 env/lib/python2.7/site-packages/nose/suite.py
  86. +0 −194 env/lib/python2.7/site-packages/nose/tools.py
  87. +0 −168 env/lib/python2.7/site-packages/nose/twistedtools.py
  88. +0 −110 env/lib/python2.7/site-packages/nose/usage.txt
  89. +0 −663 env/lib/python2.7/site-packages/nose/util.py
  90. +0 −286 env/lib/python2.7/site-packages/pep8-0.6.1-py2.7.egg/EGG-INFO/PKG-INFO
  91. +0 −15 env/lib/python2.7/site-packages/pep8-0.6.1-py2.7.egg/EGG-INFO/SOURCES.txt
  92. +0 −1  env/lib/python2.7/site-packages/pep8-0.6.1-py2.7.egg/EGG-INFO/dependency_links.txt
  93. +0 −3  env/lib/python2.7/site-packages/pep8-0.6.1-py2.7.egg/EGG-INFO/entry_points.txt
  94. +0 −1  env/lib/python2.7/site-packages/pep8-0.6.1-py2.7.egg/EGG-INFO/namespace_packages.txt
  95. +0 −1  env/lib/python2.7/site-packages/pep8-0.6.1-py2.7.egg/EGG-INFO/not-zip-safe
  96. +0 −1  env/lib/python2.7/site-packages/pep8-0.6.1-py2.7.egg/EGG-INFO/requires.txt
  97. +0 −1  env/lib/python2.7/site-packages/pep8-0.6.1-py2.7.egg/EGG-INFO/top_level.txt
  98. +0 −1,360 env/lib/python2.7/site-packages/pep8-0.6.1-py2.7.egg/pep8.py
  99. +0 −860 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/EGG-INFO/PKG-INFO
  100. +0 −48 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/EGG-INFO/SOURCES.txt
  101. +0 −1  env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/EGG-INFO/dependency_links.txt
  102. +0 −4 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/EGG-INFO/entry_points.txt
  103. +0 −1  env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/EGG-INFO/not-zip-safe
  104. +0 −1  env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/EGG-INFO/top_level.txt
  105. +0 −267 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/__init__.py
  106. +0 −592 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/_pkgutil.py
  107. +0 −115 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/backwardcompat.py
  108. +0 −205 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/basecommand.py
  109. +0 −232 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/baseparser.py
  110. +0 −1  env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/commands/__init__.py
  111. +0 −33 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/commands/bundle.py
  112. +0 −60 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/commands/completion.py
  113. +0 −109 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/commands/freeze.py
  114. +0 −31 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/commands/help.py
  115. +0 −247 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/commands/install.py
  116. +0 −116 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/commands/search.py
  117. +0 −42 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/commands/uninstall.py
  118. +0 −9 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/commands/unzip.py
  119. +0 −346 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/commands/zip.py
  120. +0 −480 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/download.py
  121. +0 −17 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/exceptions.py
  122. +0 −689 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/index.py
  123. +0 −50 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/locations.py
  124. +0 −185 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/log.py
  125. +0 −1,493 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/req.py
  126. +0 −18 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/runner.py
  127. +0 −489 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/util.py
  128. +0 −236 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/vcs/__init__.py
  129. +0 −123 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/vcs/bazaar.py
  130. +0 −205 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/vcs/git.py
  131. +0 −151 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/vcs/mercurial.py
  132. +0 −244 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/vcs/subversion.py
  133. +0 −53 env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/venv.py
  134. BIN  env/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
  135. +0 −1  env/lib/python2.7/site-packages/setuptools.pth
  136. +0 −732 env/lib/python2.7/site.py
  137. +0 −1  env/lib/python2.7/sre.py
  138. +0 −1  env/lib/python2.7/sre_compile.py
  139. +0 −1  env/lib/python2.7/sre_constants.py
  140. +0 −1  env/lib/python2.7/sre_parse.py
  141. +0 −1  env/lib/python2.7/stat.py
  142. +0 −1  env/lib/python2.7/types.py
  143. +0 −1  env/lib/python2.7/warnings.py
  144. +0 −480 env/man/man1/nosetests.1
  145. +0 −13 mimetype_matches.py
  146. +0 −3  requirements.pip
View
1  env/.Python
View
76 env/bin/activate
@@ -1,76 +0,0 @@
-# This file must be used with "source bin/activate" *from bash*
-# you cannot run it directly
-
-deactivate () {
- # reset old environment variables
- if [ -n "$_OLD_VIRTUAL_PATH" ] ; then
- PATH="$_OLD_VIRTUAL_PATH"
- export PATH
- unset _OLD_VIRTUAL_PATH
- fi
- if [ -n "$_OLD_VIRTUAL_PYTHONHOME" ] ; then
- PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME"
- export PYTHONHOME
- unset _OLD_VIRTUAL_PYTHONHOME
- fi
-
- # This should detect bash and zsh, which have a hash command that must
- # be called to get it to forget past commands. Without forgetting
- # past commands the $PATH changes we made may not be respected
- if [ -n "$BASH" -o -n "$ZSH_VERSION" ] ; then
- hash -r
- fi
-
- if [ -n "$_OLD_VIRTUAL_PS1" ] ; then
- PS1="$_OLD_VIRTUAL_PS1"
- export PS1
- unset _OLD_VIRTUAL_PS1
- fi
-
- unset VIRTUAL_ENV
- if [ ! "$1" = "nondestructive" ] ; then
- # Self destruct!
- unset -f deactivate
- fi
-}
-
-# unset irrelavent variables
-deactivate nondestructive
-
-VIRTUAL_ENV="/Users/earth911/Projects/repache/env"
-export VIRTUAL_ENV
-
-_OLD_VIRTUAL_PATH="$PATH"
-PATH="$VIRTUAL_ENV/bin:$PATH"
-export PATH
-
-# unset PYTHONHOME if set
-# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
-# could use `if (set -u; : $PYTHONHOME) ;` in bash
-if [ -n "$PYTHONHOME" ] ; then
- _OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME"
- unset PYTHONHOME
-fi
-
-if [ -z "$VIRTUAL_ENV_DISABLE_PROMPT" ] ; then
- _OLD_VIRTUAL_PS1="$PS1"
- if [ "x" != x ] ; then
- PS1="$PS1"
- else
- if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then
- # special case for Aspen magic directories
- # see http://www.zetadev.com/software/aspen/
- PS1="[`basename \`dirname \"$VIRTUAL_ENV\"\``] $PS1"
- else
- PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1"
- fi
- fi
- export PS1
-fi
-
-# This should detect bash and zsh, which have a hash command that must
-# be called to get it to forget past commands. Without forgetting
-# past commands the $PATH changes we made may not be respected
-if [ -n "$BASH" -o -n "$ZSH_VERSION" ] ; then
- hash -r
-fi
View
32 env/bin/activate.csh
@@ -1,32 +0,0 @@
-# This file must be used with "source bin/activate.csh" *from csh*.
-# You cannot run it directly.
-# Created by Davide Di Blasi <davidedb@gmail.com>.
-
-alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate'
-
-# Unset irrelavent variables.
-deactivate nondestructive
-
-setenv VIRTUAL_ENV "/Users/earth911/Projects/repache/env"
-
-set _OLD_VIRTUAL_PATH="$PATH"
-setenv PATH "$VIRTUAL_ENV/bin:$PATH"
-
-set _OLD_VIRTUAL_PROMPT="$prompt"
-
-if ("" != "") then
- set env_name = ""
-else
- if (`basename "$VIRTUAL_ENV"` == "__") then
- # special case for Aspen magic directories
- # see http://www.zetadev.com/software/aspen/
- set env_name = `basename \`dirname "$VIRTUAL_ENV"\``
- else
- set env_name = `basename "$VIRTUAL_ENV"`
- endif
-endif
-set prompt = "[$env_name] $prompt"
-unset env_name
-
-rehash
-
View
79 env/bin/activate.fish
@@ -1,79 +0,0 @@
-# This file must be used with ". bin/activate.fish" *from fish* (http://fishshell.org)
-# you cannot run it directly
-
-function deactivate -d "Exit virtualenv and return to normal shell environment"
- # reset old environment variables
- if test -n "$_OLD_VIRTUAL_PATH"
- set -gx PATH $_OLD_VIRTUAL_PATH
- set -e _OLD_VIRTUAL_PATH
- end
- if test -n "$_OLD_VIRTUAL_PYTHONHOME"
- set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
- set -e _OLD_VIRTUAL_PYTHONHOME
- end
-
- if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
- functions -e fish_prompt
- set -e _OLD_FISH_PROMPT_OVERRIDE
- end
-
- set -e VIRTUAL_ENV
- if test "$argv[1]" != "nondestructive"
- # Self destruct!
- functions -e deactivate
- end
-end
-
-# unset irrelavent variables
-deactivate nondestructive
-
-set -gx VIRTUAL_ENV "/Users/earth911/Projects/repache/env"
-
-set -gx _OLD_VIRTUAL_PATH $PATH
-set -gx PATH "$VIRTUAL_ENV/bin" $PATH
-
-# unset PYTHONHOME if set
-if set -q PYTHONHOME
- set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
- set -e PYTHONHOME
-end
-
-if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
- # fish shell uses a function, instead of env vars,
- # to produce the prompt. Overriding the existing function is easy.
- # However, adding to the current prompt, instead of clobbering it,
- # is a little more work.
- set -l oldpromptfile (tempfile)
- if test $status
- # save the current fish_prompt function...
- echo "function _old_fish_prompt" >> $oldpromptfile
- echo -n \# >> $oldpromptfile
- functions fish_prompt >> $oldpromptfile
- # we've made the "_old_fish_prompt" file, source it.
- . $oldpromptfile
- rm -f $oldpromptfile
-
- if test -n ""
- # We've been given us a prompt override.
- #
- # FIXME: Unsure how to handle this *safely*. We could just eval()
- # whatever is given, but the risk is a bit much.
- echo "activate.fish: Alternative prompt prefix is not supported under fish-shell." 1>&2
- echo "activate.fish: Alter the fish_prompt in this file as needed." 1>&2
- end
-
- # with the original prompt function renamed, we can override with our own.
- function fish_prompt
- set -l _checkbase (basename "$VIRTUAL_ENV")
- if test $_checkbase = "__"
- # special case for Aspen magic directories
- # see http://www.zetadev.com/software/aspen/
- printf "%s[%s]%s %s" (set_color -b blue white) (basename (dirname "$VIRTUAL_ENV")) (set_color normal) (_old_fish_prompt)
- else
- printf "%s(%s)%s%s" (set_color -b blue white) (basename "$VIRTUAL_ENV") (set_color normal) (_old_fish_prompt)
- end
- end
- set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
- end
-end
-
View
32 env/bin/activate_this.py
@@ -1,32 +0,0 @@
-"""By using execfile(this_file, dict(__file__=this_file)) you will
-activate this virtualenv environment.
-
-This can be used when you must use an existing Python interpreter, not
-the virtualenv bin/python
-"""
-
-try:
- __file__
-except NameError:
- raise AssertionError(
- "You must run this like execfile('path/to/activate_this.py', dict(__file__='path/to/activate_this.py'))")
-import sys
-import os
-
-base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-if sys.platform == 'win32':
- site_packages = os.path.join(base, 'Lib', 'site-packages')
-else:
- site_packages = os.path.join(base, 'lib', 'python%s' % sys.version[:3], 'site-packages')
-prev_sys_path = list(sys.path)
-import site
-site.addsitedir(site_packages)
-sys.real_prefix = sys.prefix
-sys.prefix = base
-# Move the added items to the front of the path:
-new_sys_path = []
-for item in list(sys.path):
- if item not in prev_sys_path:
- new_sys_path.append(item)
- sys.path.remove(item)
-sys.path[:0] = new_sys_path
View
9 env/bin/easy_install
@@ -1,9 +0,0 @@
-#!/Users/earth911/Projects/repache/env/bin/python
-# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==0.6c11','console_scripts','easy_install'
-__requires__ = 'setuptools==0.6c11'
-import sys
-from pkg_resources import load_entry_point
-
-sys.exit(
- load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
-)
View
9 env/bin/easy_install-2.7
@@ -1,9 +0,0 @@
-#!/Users/earth911/Projects/repache/env/bin/python
-# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==0.6c11','console_scripts','easy_install-2.7'
-__requires__ = 'setuptools==0.6c11'
-import sys
-from pkg_resources import load_entry_point
-
-sys.exit(
- load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install-2.7')()
-)
View
9 env/bin/nosetests
@@ -1,9 +0,0 @@
-#!/Users/earth911/Projects/repache/env/bin/python
-# EASY-INSTALL-ENTRY-SCRIPT: 'nose==1.1.2','console_scripts','nosetests'
-__requires__ = 'nose==1.1.2'
-import sys
-from pkg_resources import load_entry_point
-
-sys.exit(
- load_entry_point('nose==1.1.2', 'console_scripts', 'nosetests')()
-)
View
9 env/bin/nosetests-2.7
@@ -1,9 +0,0 @@
-#!/Users/earth911/Projects/repache/env/bin/python
-# EASY-INSTALL-ENTRY-SCRIPT: 'nose==1.1.2','console_scripts','nosetests-2.7'
-__requires__ = 'nose==1.1.2'
-import sys
-from pkg_resources import load_entry_point
-
-sys.exit(
- load_entry_point('nose==1.1.2', 'console_scripts', 'nosetests-2.7')()
-)
View
9 env/bin/pep8
@@ -1,9 +0,0 @@
-#!/Users/earth911/Projects/repache/env/bin/python
-# EASY-INSTALL-ENTRY-SCRIPT: 'pep8==0.6.1','console_scripts','pep8'
-__requires__ = 'pep8==0.6.1'
-import sys
-from pkg_resources import load_entry_point
-
-sys.exit(
- load_entry_point('pep8==0.6.1', 'console_scripts', 'pep8')()
-)
View
9 env/bin/pip
@@ -1,9 +0,0 @@
-#!/Users/earth911/Projects/repache/env/bin/python
-# EASY-INSTALL-ENTRY-SCRIPT: 'pip==1.0.2','console_scripts','pip'
-__requires__ = 'pip==1.0.2'
-import sys
-from pkg_resources import load_entry_point
-
-sys.exit(
- load_entry_point('pip==1.0.2', 'console_scripts', 'pip')()
-)
View
9 env/bin/pip-2.7
@@ -1,9 +0,0 @@
-#!/Users/earth911/Projects/repache/env/bin/python
-# EASY-INSTALL-ENTRY-SCRIPT: 'pip==1.0.2','console_scripts','pip-2.7'
-__requires__ = 'pip==1.0.2'
-import sys
-from pkg_resources import load_entry_point
-
-sys.exit(
- load_entry_point('pip==1.0.2', 'console_scripts', 'pip-2.7')()
-)
View
BIN  env/bin/python
Binary file not shown
View
1  env/bin/python2.7
View
1  env/include/python2.7
View
1  env/lib/python2.7/UserDict.py
View
1  env/lib/python2.7/_abcoll.py
View
1  env/lib/python2.7/_weakrefset.py
View
1  env/lib/python2.7/abc.py
View
1  env/lib/python2.7/codecs.py
View
1  env/lib/python2.7/config
View
1  env/lib/python2.7/copy_reg.py
View
97 env/lib/python2.7/distutils/__init__.py
@@ -1,97 +0,0 @@
-import os
-import sys
-import warnings
-import opcode # opcode is not a virtualenv module, so we can use it to find the stdlib
- # Important! To work on pypy, this must be a module that resides in the
- # lib-python/modified-x.y.z directory
-
-dirname = os.path.dirname
-
-distutils_path = os.path.join(os.path.dirname(opcode.__file__), 'distutils')
-if os.path.normpath(distutils_path) == os.path.dirname(os.path.normpath(__file__)):
- warnings.warn(
- "The virtualenv distutils package at %s appears to be in the same location as the system distutils?")
-else:
- __path__.insert(0, distutils_path)
- exec(open(os.path.join(distutils_path, '__init__.py')).read())
-
-try:
- import dist
- import sysconfig
-except ImportError:
- from distutils import dist, sysconfig
-try:
- basestring
-except NameError:
- basestring = str
-
-## patch build_ext (distutils doesn't know how to get the libs directory
-## path on windows - it hardcodes the paths around the patched sys.prefix)
-
-if sys.platform == 'win32':
- from distutils.command.build_ext import build_ext as old_build_ext
- class build_ext(old_build_ext):
- def finalize_options (self):
- if self.library_dirs is None:
- self.library_dirs = []
- elif isinstance(self.library_dirs, basestring):
- self.library_dirs = self.library_dirs.split(os.pathsep)
-
- self.library_dirs.insert(0, os.path.join(sys.real_prefix, "Libs"))
- old_build_ext.finalize_options(self)
-
- from distutils.command import build_ext as build_ext_module
- build_ext_module.build_ext = build_ext
-
-## distutils.dist patches:
-
-old_find_config_files = dist.Distribution.find_config_files
-def find_config_files(self):
- found = old_find_config_files(self)
- system_distutils = os.path.join(distutils_path, 'distutils.cfg')
- #if os.path.exists(system_distutils):
- # found.insert(0, system_distutils)
- # What to call the per-user config file
- if os.name == 'posix':
- user_filename = ".pydistutils.cfg"
- else:
- user_filename = "pydistutils.cfg"
- user_filename = os.path.join(sys.prefix, user_filename)
- if os.path.isfile(user_filename):
- for item in list(found):
- if item.endswith('pydistutils.cfg'):
- found.remove(item)
- found.append(user_filename)
- return found
-dist.Distribution.find_config_files = find_config_files
-
-## distutils.sysconfig patches:
-
-old_get_python_inc = sysconfig.get_python_inc
-def sysconfig_get_python_inc(plat_specific=0, prefix=None):
- if prefix is None:
- prefix = sys.real_prefix
- return old_get_python_inc(plat_specific, prefix)
-sysconfig_get_python_inc.__doc__ = old_get_python_inc.__doc__
-sysconfig.get_python_inc = sysconfig_get_python_inc
-
-old_get_python_lib = sysconfig.get_python_lib
-def sysconfig_get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
- if standard_lib and prefix is None:
- prefix = sys.real_prefix
- return old_get_python_lib(plat_specific, standard_lib, prefix)
-sysconfig_get_python_lib.__doc__ = old_get_python_lib.__doc__
-sysconfig.get_python_lib = sysconfig_get_python_lib
-
-old_get_config_vars = sysconfig.get_config_vars
-def sysconfig_get_config_vars(*args):
- real_vars = old_get_config_vars(*args)
- if sys.platform == 'win32':
- lib_dir = os.path.join(sys.real_prefix, "libs")
- if isinstance(real_vars, dict) and 'LIBDIR' not in real_vars:
- real_vars['LIBDIR'] = lib_dir # asked for all
- elif isinstance(real_vars, list) and 'LIBDIR' in args:
- real_vars = real_vars + [lib_dir] # asked for list
- return real_vars
-sysconfig_get_config_vars.__doc__ = old_get_config_vars.__doc__
-sysconfig.get_config_vars = sysconfig_get_config_vars
View
6 env/lib/python2.7/distutils/distutils.cfg
@@ -1,6 +0,0 @@
-# This is a config file local to this virtualenv installation
-# You may include options that will be used by all distutils commands,
-# and by easy_install. For instance:
-#
-# [easy_install]
-# find_links = http://mylocalsite
View
1  env/lib/python2.7/encodings
View
1  env/lib/python2.7/fnmatch.py
View
1  env/lib/python2.7/genericpath.py
View
1  env/lib/python2.7/lib-dynload
View
1  env/lib/python2.7/linecache.py
View
1  env/lib/python2.7/locale.py
View
0  env/lib/python2.7/no-global-site-packages.txt
No changes.
View
1  env/lib/python2.7/ntpath.py
View
1  env/lib/python2.7/orig-prefix.txt
@@ -1 +0,0 @@
-/System/Library/Frameworks/Python.framework/Versions/2.7
View
1  env/lib/python2.7/os.py
View
1  env/lib/python2.7/posixpath.py
View
1  env/lib/python2.7/re.py
View
5 env/lib/python2.7/site-packages/easy-install.pth
@@ -1,5 +0,0 @@
-import sys; sys.__plen = len(sys.path)
-./setuptools-0.6c11-py2.7.egg
-./pip-1.0.2-py2.7.egg
-./pep8-0.6.1-py2.7.egg
-import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)
View
38 env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/PKG-INFO
@@ -1,38 +0,0 @@
-Metadata-Version: 1.0
-Name: nose
-Version: 1.1.2
-Summary: nose extends unittest to make testing easier
-Home-page: http://readthedocs.org/docs/nose/
-Author: Jason Pellerin
-Author-email: jpellerin+nose@gmail.com
-License: GNU LGPL
-Description: nose extends the test loading and running features of unittest, making
- it easier to write, find and run tests.
-
- By default, nose will run tests in files or directories under the current
- working directory whose names include "test" or "Test" at a word boundary
- (like "test_this" or "functional_test" or "TestClass" but not
- "libtest"). Test output is similar to that of unittest, but also includes
- captured stdout output from failing tests, for easy print-style debugging.
-
- These features, and many more, are customizable through the use of
- plugins. Plugins included with nose provide support for doctest, code
- coverage and profiling, flexible attribute-based test selection,
- output capture and more. More information about writing plugins may be
- found on in the nose API documentation, here:
- http://somethingaboutorange.com/mrl/projects/nose/
-
- If you have recently reported a bug marked as fixed, or have a craving for
- the very latest, you may want the unstable development version instead:
- http://bitbucket.org/jpellerin/nose/get/tip.gz#egg=nose-dev
-
-Keywords: test unittest doctest automatic discovery
-Platform: UNKNOWN
-Classifier: Development Status :: 4 - Beta
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
-Classifier: Natural Language :: English
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 3
-Classifier: Topic :: Software Development :: Testing
View
52 env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/SOURCES.txt
@@ -1,52 +0,0 @@
-README.txt
-setup.cfg
-nose/__init__.py
-nose/case.py
-nose/commands.py
-nose/config.py
-nose/core.py
-nose/exc.py
-nose/failure.py
-nose/importer.py
-nose/inspector.py
-nose/loader.py
-nose/proxy.py
-nose/pyversion.py
-nose/result.py
-nose/selector.py
-nose/suite.py
-nose/tools.py
-nose/twistedtools.py
-nose/util.py
-nose.egg-info/PKG-INFO
-nose.egg-info/SOURCES.txt
-nose.egg-info/dependency_links.txt
-nose.egg-info/entry_points.txt
-nose.egg-info/not-zip-safe
-nose.egg-info/top_level.txt
-nose/ext/__init__.py
-nose/ext/dtcompat.py
-nose/plugins/__init__.py
-nose/plugins/allmodules.py
-nose/plugins/attrib.py
-nose/plugins/base.py
-nose/plugins/builtin.py
-nose/plugins/capture.py
-nose/plugins/collect.py
-nose/plugins/cover.py
-nose/plugins/debug.py
-nose/plugins/deprecated.py
-nose/plugins/doctests.py
-nose/plugins/errorclass.py
-nose/plugins/failuredetail.py
-nose/plugins/isolate.py
-nose/plugins/logcapture.py
-nose/plugins/manager.py
-nose/plugins/multiprocess.py
-nose/plugins/plugintest.py
-nose/plugins/prof.py
-nose/plugins/skip.py
-nose/plugins/testid.py
-nose/plugins/xunit.py
-nose/sphinx/__init__.py
-nose/sphinx/pluginopts.py
View
1  env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/dependency_links.txt
@@ -1 +0,0 @@
-
View
7 env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/entry_points.txt
@@ -1,7 +0,0 @@
-[console_scripts]
-nosetests = nose:run_exit
-nosetests-2.7 = nose:run_exit
-
-[distutils.commands]
-nosetests = nose.commands:nosetests
-
View
99 env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/installed-files.txt
@@ -1,99 +0,0 @@
-../nose/__init__.py
-../nose/case.py
-../nose/commands.py
-../nose/config.py
-../nose/core.py
-../nose/exc.py
-../nose/failure.py
-../nose/importer.py
-../nose/inspector.py
-../nose/loader.py
-../nose/proxy.py
-../nose/pyversion.py
-../nose/result.py
-../nose/selector.py
-../nose/suite.py
-../nose/tools.py
-../nose/twistedtools.py
-../nose/util.py
-../nose/ext/__init__.py
-../nose/ext/dtcompat.py
-../nose/plugins/__init__.py
-../nose/plugins/allmodules.py
-../nose/plugins/attrib.py
-../nose/plugins/base.py
-../nose/plugins/builtin.py
-../nose/plugins/capture.py
-../nose/plugins/collect.py
-../nose/plugins/cover.py
-../nose/plugins/debug.py
-../nose/plugins/deprecated.py
-../nose/plugins/doctests.py
-../nose/plugins/errorclass.py
-../nose/plugins/failuredetail.py
-../nose/plugins/isolate.py
-../nose/plugins/logcapture.py
-../nose/plugins/manager.py
-../nose/plugins/multiprocess.py
-../nose/plugins/plugintest.py
-../nose/plugins/prof.py
-../nose/plugins/skip.py
-../nose/plugins/testid.py
-../nose/plugins/xunit.py
-../nose/sphinx/__init__.py
-../nose/sphinx/pluginopts.py
-../nose/usage.txt
-../nose/__init__.pyc
-../nose/case.pyc
-../nose/commands.pyc
-../nose/config.pyc
-../nose/core.pyc
-../nose/exc.pyc
-../nose/failure.pyc
-../nose/importer.pyc
-../nose/inspector.pyc
-../nose/loader.pyc
-../nose/proxy.pyc
-../nose/pyversion.pyc
-../nose/result.pyc
-../nose/selector.pyc
-../nose/suite.pyc
-../nose/tools.pyc
-../nose/twistedtools.pyc
-../nose/util.pyc
-../nose/ext/__init__.pyc
-../nose/ext/dtcompat.pyc
-../nose/plugins/__init__.pyc
-../nose/plugins/allmodules.pyc
-../nose/plugins/attrib.pyc
-../nose/plugins/base.pyc
-../nose/plugins/builtin.pyc
-../nose/plugins/capture.pyc
-../nose/plugins/collect.pyc
-../nose/plugins/cover.pyc
-../nose/plugins/debug.pyc
-../nose/plugins/deprecated.pyc
-../nose/plugins/doctests.pyc
-../nose/plugins/errorclass.pyc
-../nose/plugins/failuredetail.pyc
-../nose/plugins/isolate.pyc
-../nose/plugins/logcapture.pyc
-../nose/plugins/manager.pyc
-../nose/plugins/multiprocess.pyc
-../nose/plugins/plugintest.pyc
-../nose/plugins/prof.pyc
-../nose/plugins/skip.pyc
-../nose/plugins/testid.pyc
-../nose/plugins/xunit.pyc
-../nose/sphinx/__init__.pyc
-../nose/sphinx/pluginopts.pyc
-../../../../man/man1/nosetests.1
-./
-dependency_links.txt
-entry_points.txt
-not-zip-safe
-PKG-INFO
-SOURCES.txt
-top_level.txt
-../../../../bin/nosetests
-../../../../bin/nosetests-2.7
View
1  env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/not-zip-safe
@@ -1 +0,0 @@
-
View
1  env/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg-info/top_level.txt
@@ -1 +0,0 @@
-nose
View
15 env/lib/python2.7/site-packages/nose/__init__.py
@@ -1,15 +0,0 @@
-from nose.core import collector, main, run, run_exit, runmodule
-# backwards compatibility
-from nose.exc import SkipTest, DeprecatedTest
-from nose.tools import with_setup
-
-__author__ = 'Jason Pellerin'
-__versioninfo__ = (1, 1, 2)
-__version__ = '.'.join(map(str, __versioninfo__))
-
-__all__ = [
- 'main', 'run', 'run_exit', 'runmodule', 'with_setup',
- 'SkipTest', 'DeprecatedTest', 'collector'
- ]
-
-
View
397 env/lib/python2.7/site-packages/nose/case.py
@@ -1,397 +0,0 @@
-"""nose unittest.TestCase subclasses. It is not necessary to subclass these
-classes when writing tests; they are used internally by nose.loader.TestLoader
-to create test cases from test functions and methods in test classes.
-"""
-import logging
-import sys
-import unittest
-from inspect import isfunction
-from nose.config import Config
-from nose.failure import Failure # for backwards compatibility
-from nose.util import resolve_name, test_address, try_run
-
-log = logging.getLogger(__name__)
-
-
-__all__ = ['Test']
-
-
-class Test(unittest.TestCase):
- """The universal test case wrapper.
-
- When a plugin sees a test, it will always see an instance of this
- class. To access the actual test case that will be run, access the
- test property of the nose.case.Test instance.
- """
- __test__ = False # do not collect
- def __init__(self, test, config=None, resultProxy=None):
- # sanity check
- if not callable(test):
- raise TypeError("nose.case.Test called with argument %r that "
- "is not callable. A callable is required."
- % test)
- self.test = test
- if config is None:
- config = Config()
- self.config = config
- self.tbinfo = None
- self.capturedOutput = None
- self.resultProxy = resultProxy
- self.plugins = config.plugins
- self.passed = None
- unittest.TestCase.__init__(self)
-
- def __call__(self, *arg, **kwarg):
- return self.run(*arg, **kwarg)
-
- def __str__(self):
- name = self.plugins.testName(self)
- if name is not None:
- return name
- return str(self.test)
-
- def __repr__(self):
- return "Test(%r)" % self.test
-
- def afterTest(self, result):
- """Called after test is complete (after result.stopTest)
- """
- try:
- afterTest = result.afterTest
- except AttributeError:
- pass
- else:
- afterTest(self.test)
-
- def beforeTest(self, result):
- """Called before test is run (before result.startTest)
- """
- try:
- beforeTest = result.beforeTest
- except AttributeError:
- pass
- else:
- beforeTest(self.test)
-
- def exc_info(self):
- """Extract exception info.
- """
- exc, exv, tb = sys.exc_info()
- return (exc, exv, tb)
-
- def id(self):
- """Get a short(er) description of the test
- """
- return self.test.id()
-
- def address(self):
- """Return a round-trip name for this test, a name that can be
- fed back as input to loadTestByName and (assuming the same
- plugin configuration) result in the loading of this test.
- """
- if hasattr(self.test, 'address'):
- return self.test.address()
- else:
- # not a nose case
- return test_address(self.test)
-
- def _context(self):
- try:
- return self.test.context
- except AttributeError:
- pass
- try:
- return self.test.__class__
- except AttributeError:
- pass
- try:
- return resolve_name(self.test.__module__)
- except AttributeError:
- pass
- return None
- context = property(_context, None, None,
- """Get the context object of this test (if any).""")
-
- def run(self, result):
- """Modified run for the test wrapper.
-
- From here we don't call result.startTest or stopTest or
- addSuccess. The wrapper calls addError/addFailure only if its
- own setup or teardown fails, or running the wrapped test fails
- (eg, if the wrapped "test" is not callable).
-
- Two additional methods are called, beforeTest and
- afterTest. These give plugins a chance to modify the wrapped
- test before it is called and do cleanup after it is
- called. They are called unconditionally.
- """
- if self.resultProxy:
- result = self.resultProxy(result, self)
- try:
- try:
- self.beforeTest(result)
- self.runTest(result)
- except KeyboardInterrupt:
- raise
- except:
- err = sys.exc_info()
- result.addError(self, err)
- finally:
- self.afterTest(result)
-
- def runTest(self, result):
- """Run the test. Plugins may alter the test by returning a
- value from prepareTestCase. The value must be callable and
- must accept one argument, the result instance.
- """
- test = self.test
- plug_test = self.config.plugins.prepareTestCase(self)
- if plug_test is not None:
- test = plug_test
- test(result)
-
- def shortDescription(self):
- desc = self.plugins.describeTest(self)
- if desc is not None:
- return desc
- # work around bug in unittest.TestCase.shortDescription
- # with multiline docstrings.
- test = self.test
- try:
- test._testMethodDoc = test._testMethodDoc.strip()# 2.5
- except AttributeError:
- try:
- # 2.4 and earlier
- test._TestCase__testMethodDoc = \
- test._TestCase__testMethodDoc.strip()
- except AttributeError:
- pass
- # 2.7 compat: shortDescription() always returns something
- # which is a change from 2.6 and below, and breaks the
- # testName plugin call.
- try:
- desc = self.test.shortDescription()
- except Exception:
- # this is probably caused by a problem in test.__str__() and is
- # only triggered by python 3.1's unittest!
- pass
- try:
- if desc == str(self.test):
- return
- except Exception:
- # If str() triggers an exception then ignore it.
- # see issue 422
- pass
- return desc
-
-
-class TestBase(unittest.TestCase):
- """Common functionality for FunctionTestCase and MethodTestCase.
- """
- __test__ = False # do not collect
-
- def id(self):
- return str(self)
-
- def runTest(self):
- self.test(*self.arg)
-
- def shortDescription(self):
- if hasattr(self.test, 'description'):
- return self.test.description
- func, arg = self._descriptors()
- doc = getattr(func, '__doc__', None)
- if not doc:
- doc = str(self)
- return doc.strip().split("\n")[0].strip()
-
-
-class FunctionTestCase(TestBase):
- """TestCase wrapper for test functions.
-
- Don't use this class directly; it is used internally in nose to
- create test cases for test functions.
- """
- __test__ = False # do not collect
-
- def __init__(self, test, setUp=None, tearDown=None, arg=tuple(),
- descriptor=None):
- """Initialize the MethodTestCase.
-
- Required argument:
-
- * test -- the test function to call.
-
- Optional arguments:
-
- * setUp -- function to run at setup.
-
- * tearDown -- function to run at teardown.
-
- * arg -- arguments to pass to the test function. This is to support
- generator functions that yield arguments.
-
- * descriptor -- the function, other than the test, that should be used
- to construct the test name. This is to support generator functions.
- """
-
- self.test = test
- self.setUpFunc = setUp
- self.tearDownFunc = tearDown
- self.arg = arg
- self.descriptor = descriptor
- TestBase.__init__(self)
-
- def address(self):
- """Return a round-trip name for this test, a name that can be
- fed back as input to loadTestByName and (assuming the same
- plugin configuration) result in the loading of this test.
- """
- if self.descriptor is not None:
- return test_address(self.descriptor)
- else:
- return test_address(self.test)
-
- def _context(self):
- return resolve_name(self.test.__module__)
- context = property(_context, None, None,
- """Get context (module) of this test""")
-
- def setUp(self):
- """Run any setup function attached to the test function
- """
- if self.setUpFunc:
- self.setUpFunc()
- else:
- names = ('setup', 'setUp', 'setUpFunc')
- try_run(self.test, names)
-
- def tearDown(self):
- """Run any teardown function attached to the test function
- """
- if self.tearDownFunc:
- self.tearDownFunc()
- else:
- names = ('teardown', 'tearDown', 'tearDownFunc')
- try_run(self.test, names)
-
- def __str__(self):
- func, arg = self._descriptors()
- if hasattr(func, 'compat_func_name'):
- name = func.compat_func_name
- else:
- name = func.__name__
- name = "%s.%s" % (func.__module__, name)
- if arg:
- name = "%s%s" % (name, arg)
- # FIXME need to include the full dir path to disambiguate
- # in cases where test module of the same name was seen in
- # another directory (old fromDirectory)
- return name
- __repr__ = __str__
-
- def _descriptors(self):
- """Get the descriptors of the test function: the function and
- arguments that will be used to construct the test name. In
- most cases, this is the function itself and no arguments. For
- tests generated by generator functions, the original
- (generator) function and args passed to the generated function
- are returned.
- """
- if self.descriptor:
- return self.descriptor, self.arg
- else:
- return self.test, self.arg
-
-
-class MethodTestCase(TestBase):
- """Test case wrapper for test methods.
-
- Don't use this class directly; it is used internally in nose to
- create test cases for test methods.
- """
- __test__ = False # do not collect
-
- def __init__(self, method, test=None, arg=tuple(), descriptor=None):
- """Initialize the MethodTestCase.
-
- Required argument:
-
- * method -- the method to call, may be bound or unbound. In either
- case, a new instance of the method's class will be instantiated to
- make the call. Note: In Python 3.x, if using an unbound method, you
- must wrap it using pyversion.unbound_method.
-
- Optional arguments:
-
- * test -- the test function to call. If this is passed, it will be
- called instead of getting a new bound method of the same name as the
- desired method from the test instance. This is to support generator
- methods that yield inline functions.
-
- * arg -- arguments to pass to the test function. This is to support
- generator methods that yield arguments.
-
- * descriptor -- the function, other than the test, that should be used
- to construct the test name. This is to support generator methods.
- """
- self.method = method
- self.test = test
- self.arg = arg
- self.descriptor = descriptor
- if isfunction(method):
- raise ValueError("Unbound methods must be wrapped using pyversion.unbound_method before passing to MethodTestCase")
- self.cls = method.im_class
- self.inst = self.cls()
- if self.test is None:
- method_name = self.method.__name__
- self.test = getattr(self.inst, method_name)
- TestBase.__init__(self)
-
- def __str__(self):
- func, arg = self._descriptors()
- if hasattr(func, 'compat_func_name'):
- name = func.compat_func_name
- else:
- name = func.__name__
- name = "%s.%s.%s" % (self.cls.__module__,
- self.cls.__name__,
- name)
- if arg:
- name = "%s%s" % (name, arg)
- return name
- __repr__ = __str__
-
- def address(self):
- """Return a round-trip name for this test, a name that can be
- fed back as input to loadTestByName and (assuming the same
- plugin configuration) result in the loading of this test.
- """
- if self.descriptor is not None:
- return test_address(self.descriptor)
- else:
- return test_address(self.method)
-
- def _context(self):
- return self.cls
- context = property(_context, None, None,
- """Get context (class) of this test""")
-
- def setUp(self):
- try_run(self.inst, ('setup', 'setUp'))
-
- def tearDown(self):
- try_run(self.inst, ('teardown', 'tearDown'))
-
- def _descriptors(self):
- """Get the descriptors of the test method: the method and
- arguments that will be used to construct the test name. In
- most cases, this is the method itself and no arguments. For
- tests generated by generator methods, the original
- (generator) method and args passed to the generated method
- or function are returned.
- """
- if self.descriptor:
- return self.descriptor, self.arg
- else:
- return self.method, self.arg
View
146 env/lib/python2.7/site-packages/nose/commands.py
@@ -1,146 +0,0 @@
-"""
-nosetests setuptools command
-----------------------------
-
-The easiest way to run tests with nose is to use the `nosetests` setuptools
-command::
-
- python setup.py nosetests
-
-This command has one *major* benefit over the standard `test` command: *all
-nose plugins are supported*.
-
-To configure the `nosetests` command, add a [nosetests] section to your
-setup.cfg. The [nosetests] section can contain any command line arguments that
-nosetests supports. The differences between issuing an option on the command
-line and adding it to setup.cfg are:
-
-* In setup.cfg, the -- prefix must be excluded
-* In setup.cfg, command line flags that take no arguments must be given an
- argument flag (1, T or TRUE for active, 0, F or FALSE for inactive)
-
-Here's an example [nosetests] setup.cfg section::
-
- [nosetests]
- verbosity=1
- detailed-errors=1
- with-coverage=1
- cover-package=nose
- debug=nose.loader
- pdb=1
- pdb-failures=1
-
-If you commonly run nosetests with a large number of options, using
-the nosetests setuptools command and configuring with setup.cfg can
-make running your tests much less tedious. (Note that the same options
-and format supported in setup.cfg are supported in all other config
-files, and the nosetests script will also load config files.)
-
-Another reason to run tests with the command is that the command will
-install packages listed in your `tests_require`, as well as doing a
-complete build of your package before running tests. For packages with
-dependencies or that build C extensions, using the setuptools command
-can be more convenient than building by hand and running the nosetests
-script.
-
-Bootstrapping
--------------
-
-If you are distributing your project and want users to be able to run tests
-without having to install nose themselves, add nose to the setup_requires
-section of your setup()::
-
- setup(
- # ...
- setup_requires=['nose>=1.0']
- )
-
-This will direct setuptools to download and activate nose during the setup
-process, making the ``nosetests`` command available.
-
-"""
-try:
- from setuptools import Command
-except ImportError:
- Command = nosetests = None
-else:
- from nose.config import Config, option_blacklist, user_config_files, \
- flag, _bool
- from nose.core import TestProgram
- from nose.plugins import DefaultPluginManager
-
-
- def get_user_options(parser):
- """convert a optparse option list into a distutils option tuple list"""
- opt_list = []
- for opt in parser.option_list:
- if opt._long_opts[0][2:] in option_blacklist:
- continue
- long_name = opt._long_opts[0][2:]
- if opt.action not in ('store_true', 'store_false'):
- long_name = long_name + "="
- short_name = None
- if opt._short_opts:
- short_name = opt._short_opts[0][1:]
- opt_list.append((long_name, short_name, opt.help or ""))
- return opt_list
-
-
- class nosetests(Command):
- description = "Run unit tests using nosetests"
- __config = Config(files=user_config_files(),
- plugins=DefaultPluginManager())
- __parser = __config.getParser()
- user_options = get_user_options(__parser)
-
- def initialize_options(self):
- """create the member variables, but change hyphens to
- underscores
- """
-
- self.option_to_cmds = {}
- for opt in self.__parser.option_list:
- cmd_name = opt._long_opts[0][2:]
- option_name = cmd_name.replace('-', '_')
- self.option_to_cmds[option_name] = cmd_name
- setattr(self, option_name, None)
- self.attr = None
-
- def finalize_options(self):
- """nothing to do here"""
- pass
-
- def run(self):
- """ensure tests are capable of being run, then
- run nose.main with a reconstructed argument list"""
- self.run_command('egg_info')
-
- # Build extensions in-place
- self.reinitialize_command('build_ext', inplace=1)
- self.run_command('build_ext')
-
- if self.distribution.install_requires:
- self.distribution.fetch_build_eggs(
- self.distribution.install_requires)
- if self.distribution.tests_require:
- self.distribution.fetch_build_eggs(
- self.distribution.tests_require)
-
- argv = ['nosetests']
- for (option_name, cmd_name) in self.option_to_cmds.items():
- if option_name in option_blacklist:
- continue
- value = getattr(self, option_name)
- if value is not None:
- argv.extend(
- self.cfgToArg(option_name.replace('_', '-'), value))
- TestProgram(argv=argv, config=self.__config)
-
- def cfgToArg(self, optname, value):
- argv = []
- if flag(value):
- if _bool(value):
- argv.append('--' + optname)
- else:
- argv.extend(['--' + optname, value])
- return argv
View
638 env/lib/python2.7/site-packages/nose/config.py
@@ -1,638 +0,0 @@
-import logging
-import optparse
-import os
-import re
-import sys
-import ConfigParser
-from optparse import OptionParser
-from nose.util import absdir, tolist
-from nose.plugins.manager import NoPlugins
-from warnings import warn
-
-log = logging.getLogger(__name__)
-
-# not allowed in config files
-option_blacklist = ['help', 'verbose']
-
-config_files = [
- # Linux users will prefer this
- "~/.noserc",
- # Windows users will prefer this
- "~/nose.cfg"
- ]
-
-# plaforms on which the exe check defaults to off
-# Windows and IronPython
-exe_allowed_platforms = ('win32', 'cli')
-
-
-class NoSuchOptionError(Exception):
- def __init__(self, name):
- Exception.__init__(self, name)
- self.name = name
-
-
-class ConfigError(Exception):
- pass
-
-
-class ConfiguredDefaultsOptionParser(object):
- """
- Handler for options from commandline and config files.
- """
- def __init__(self, parser, config_section, error=None, file_error=None):
- self._parser = parser
- self._config_section = config_section
- if error is None:
- error = self._parser.error
- self._error = error
- if file_error is None:
- file_error = lambda msg, **kw: error(msg)
- self._file_error = file_error
-
- def _configTuples(self, cfg, filename):
- config = []
- if self._config_section in cfg.sections():
- for name, value in cfg.items(self._config_section):
- config.append((name, value, filename))
- return config
-
- def _readFromFilenames(self, filenames):
- config = []
- for filename in filenames:
- cfg = ConfigParser.RawConfigParser()
- try:
- cfg.read(filename)
- except ConfigParser.Error, exc:
- raise ConfigError("Error reading config file %r: %s" %
- (filename, str(exc)))
- config.extend(self._configTuples(cfg, filename))
- return config
-
- def _readFromFileObject(self, fh):
- cfg = ConfigParser.RawConfigParser()
- try:
- filename = fh.name
- except AttributeError:
- filename = '<???>'
- try:
- cfg.readfp(fh)
- except ConfigParser.Error, exc:
- raise ConfigError("Error reading config file %r: %s" %
- (filename, str(exc)))
- return self._configTuples(cfg, filename)
-
- def _readConfiguration(self, config_files):
- try:
- config_files.readline
- except AttributeError:
- filename_or_filenames = config_files
- if isinstance(filename_or_filenames, basestring):
- filenames = [filename_or_filenames]
- else:
- filenames = filename_or_filenames
- config = self._readFromFilenames(filenames)
- else:
- fh = config_files
- config = self._readFromFileObject(fh)
- return config
-
- def _processConfigValue(self, name, value, values, parser):
- opt_str = '--' + name
- option = parser.get_option(opt_str)
- if option is None:
- raise NoSuchOptionError(name)
- else:
- option.process(opt_str, value, values, parser)
-
- def _applyConfigurationToValues(self, parser, config, values):
- for name, value, filename in config:
- if name in option_blacklist:
- continue
- try:
- self._processConfigValue(name, value, values, parser)
- except NoSuchOptionError, exc:
- self._file_error(
- "Error reading config file %r: "
- "no such option %r" % (filename, exc.name),
- name=name, filename=filename)
- except optparse.OptionValueError, exc:
- msg = str(exc).replace('--' + name, repr(name), 1)
- self._file_error("Error reading config file %r: "
- "%s" % (filename, msg),
- name=name, filename=filename)
-
- def parseArgsAndConfigFiles(self, args, config_files):
- values = self._parser.get_default_values()
- try:
- config = self._readConfiguration(config_files)
- except ConfigError, exc:
- self._error(str(exc))
- else:
- self._applyConfigurationToValues(self._parser, config, values)
- return self._parser.parse_args(args, values)
-
-
-class Config(object):
- """nose configuration.
-
- Instances of Config are used throughout nose to configure
- behavior, including plugin lists. Here are the default values for
- all config keys::
-
- self.env = env = kw.pop('env', {})
- self.args = ()
- self.testMatch = re.compile(r'(?:^|[\\b_\\.%s-])[Tt]est' % os.sep)
- self.addPaths = not env.get('NOSE_NOPATH', False)
- self.configSection = 'nosetests'
- self.debug = env.get('NOSE_DEBUG')
- self.debugLog = env.get('NOSE_DEBUG_LOG')
- self.exclude = None
- self.getTestCaseNamesCompat = False
- self.includeExe = env.get('NOSE_INCLUDE_EXE',
- sys.platform in exe_allowed_platforms)
- self.ignoreFiles = (re.compile(r'^\.'),
- re.compile(r'^_'),
- re.compile(r'^setup\.py$')
- )
- self.include = None
- self.loggingConfig = None
- self.logStream = sys.stderr
- self.options = NoOptions()
- self.parser = None
- self.plugins = NoPlugins()
- self.srcDirs = ('lib', 'src')
- self.runOnInit = True
- self.stopOnError = env.get('NOSE_STOP', False)
- self.stream = sys.stderr
- self.testNames = ()
- self.verbosity = int(env.get('NOSE_VERBOSE', 1))
- self.where = ()
- self.py3where = ()
- self.workingDir = None
- """
-
- def __init__(self, **kw):
- self.env = env = kw.pop('env', {})
- self.args = ()
- self.testMatchPat = env.get('NOSE_TESTMATCH',
- r'(?:^|[\b_\.%s-])[Tt]est' % os.sep)
- self.testMatch = re.compile(self.testMatchPat)
- self.addPaths = not env.get('NOSE_NOPATH', False)
- self.configSection = 'nosetests'
- self.debug = env.get('NOSE_DEBUG')
- self.debugLog = env.get('NOSE_DEBUG_LOG')
- self.exclude = None
- self.getTestCaseNamesCompat = False
- self.includeExe = env.get('NOSE_INCLUDE_EXE',
- sys.platform in exe_allowed_platforms)
- self.ignoreFilesDefaultStrings = [r'^\.',
- r'^_',
- r'^setup\.py$',
- ]
- self.ignoreFiles = map(re.compile, self.ignoreFilesDefaultStrings)
- self.include = None
- self.loggingConfig = None
- self.logStream = sys.stderr
- self.options = NoOptions()
- self.parser = None
- self.plugins = NoPlugins()
- self.srcDirs = ('lib', 'src')
- self.runOnInit = True
- self.stopOnError = env.get('NOSE_STOP', False)
- self.stream = sys.stderr
- self.testNames = []
- self.verbosity = int(env.get('NOSE_VERBOSE', 1))
- self.where = ()
- self.py3where = ()
- self.workingDir = os.getcwd()
- self.traverseNamespace = False
- self.firstPackageWins = False
- self.parserClass = OptionParser
- self.worker = False
-
- self._default = self.__dict__.copy()
- self.update(kw)
- self._orig = self.__dict__.copy()
-
- def __getstate__(self):
- state = self.__dict__.copy()
- del state['stream']
- del state['_orig']
- del state['_default']
- del state['env']
- del state['logStream']
- # FIXME remove plugins, have only plugin manager class
- state['plugins'] = self.plugins.__class__
- return state
-
- def __setstate__(self, state):
- plugincls = state.pop('plugins')
- self.update(state)
- self.worker = True
- # FIXME won't work for static plugin lists
- self.plugins = plugincls()
- self.plugins.loadPlugins()
- # needed so .can_configure gets set appropriately
- dummy_parser = self.parserClass()
- self.plugins.addOptions(dummy_parser, {})
- self.plugins.configure(self.options, self)
-
- def __repr__(self):
- d = self.__dict__.copy()
- # don't expose env, could include sensitive info
- d['env'] = {}
- keys = [ k for k in d.keys()
- if not k.startswith('_') ]
- keys.sort()
- return "Config(%s)" % ', '.join([ '%s=%r' % (k, d[k])
- for k in keys ])
- __str__ = __repr__
-
- def _parseArgs(self, argv, cfg_files):
- def warn_sometimes(msg, name=None, filename=None):
- if (hasattr(self.plugins, 'excludedOption') and
- self.plugins.excludedOption(name)):
- msg = ("Option %r in config file %r ignored: "
- "excluded by runtime environment" %
- (name, filename))
- warn(msg, RuntimeWarning)
- else:
- raise ConfigError(msg)
- parser = ConfiguredDefaultsOptionParser(
- self.getParser(), self.configSection, file_error=warn_sometimes)
- return parser.parseArgsAndConfigFiles(argv[1:], cfg_files)
-
- def configure(self, argv=None, doc=None):
- """Configure the nose running environment. Execute configure before
- collecting tests with nose.TestCollector to enable output capture and
- other features.
- """
- env = self.env
- if argv is None:
- argv = sys.argv
-
- cfg_files = getattr(self, 'files', [])
- options, args = self._parseArgs(argv, cfg_files)
- # If -c --config has been specified on command line,
- # load those config files and reparse
- if getattr(options, 'files', []):
- options, args = self._parseArgs(argv, options.files)
-
- self.options = options
- if args:
- self.testNames = args
- if options.testNames is not None:
- self.testNames.extend(tolist(options.testNames))
-
- if options.py3where is not None:
- if sys.version_info >= (3,):
- options.where = options.py3where
-
- # `where` is an append action, so it can't have a default value
- # in the parser, or that default will always be in the list
- if not options.where:
- options.where = env.get('NOSE_WHERE', None)
-
- # include and exclude also
- if not options.ignoreFiles:
- options.ignoreFiles = env.get('NOSE_IGNORE_FILES', [])
- if not options.include:
- options.include = env.get('NOSE_INCLUDE', [])
- if not options.exclude:
- options.exclude = env.get('NOSE_EXCLUDE', [])
-
- self.addPaths = options.addPaths
- self.stopOnError = options.stopOnError
- self.verbosity = options.verbosity
- self.includeExe = options.includeExe
- self.traverseNamespace = options.traverseNamespace
- self.debug = options.debug
- self.debugLog = options.debugLog
- self.loggingConfig = options.loggingConfig
- self.firstPackageWins = options.firstPackageWins
- self.configureLogging()
-
- if options.where is not None:
- self.configureWhere(options.where)
-
- if options.testMatch:
- self.testMatch = re.compile(options.testMatch)
-
- if options.ignoreFiles:
- self.ignoreFiles = map(re.compile, tolist(options.ignoreFiles))
- log.info("Ignoring files matching %s", options.ignoreFiles)
- else:
- log.info("Ignoring files matching %s", self.ignoreFilesDefaultStrings)
-
- if options.include:
- self.include = map(re.compile, tolist(options.include))
- log.info("Including tests matching %s", options.include)
-
- if options.exclude:
- self.exclude = map(re.compile, tolist(options.exclude))
- log.info("Excluding tests matching %s", options.exclude)
-
- # When listing plugins we don't want to run them
- if not options.showPlugins:
- self.plugins.configure(options, self)
- self.plugins.begin()
-
- def configureLogging(self):
- """Configure logging for nose, or optionally other packages. Any logger
- name may be set with the debug option, and that logger will be set to
- debug level and be assigned the same handler as the nose loggers, unless
- it already has a handler.
- """
- if self.loggingConfig:
- from logging.config import fileConfig
- fileConfig(self.loggingConfig)
- return
-
- format = logging.Formatter('%(name)s: %(levelname)s: %(message)s')
- if self.debugLog:
- handler = logging.FileHandler(self.debugLog)
- else:
- handler = logging.StreamHandler(self.logStream)
- handler.setFormatter(format)
-
- logger = logging.getLogger('nose')
- logger.propagate = 0
-
- # only add our default handler if there isn't already one there
- # this avoids annoying duplicate log messages.
- if handler not in logger.handlers:
- logger.addHandler(handler)
-
- # default level
- lvl = logging.WARNING
- if self.verbosity >= 5:
- lvl = 0
- elif self.verbosity >= 4:
- lvl = logging.DEBUG
- elif self.verbosity >= 3:
- lvl = logging.INFO
- logger.setLevel(lvl)
-
- # individual overrides
- if self.debug:
- # no blanks
- debug_loggers = [ name for name in self.debug.split(',')
- if name ]
- for logger_name in debug_loggers:
- l = logging.getLogger(logger_name)
- l.setLevel(logging.DEBUG)
- if not l.handlers and not logger_name.startswith('nose'):
- l.addHandler(handler)
-
- def configureWhere(self, where):
- """Configure the working directory or directories for the test run.
- """
- from nose.importer import add_path
- self.workingDir = None
- where = tolist(where)
- warned = False
- for path in where:
- if not self.workingDir:
- abs_path = absdir(path)
- if abs_path is None:
- raise ValueError("Working directory %s not found, or "
- "not a directory" % path)
- log.info("Set working dir to %s", abs_path)
- self.workingDir = abs_path
- if self.addPaths and \
- os.path.exists(os.path.join(abs_path, '__init__.py')):
- log.info("Working directory %s is a package; "
- "adding to sys.path" % abs_path)
- add_path(abs_path)
- continue
- if not warned:
- warn("Use of multiple -w arguments is deprecated and "
- "support may be removed in a future release. You can "
- "get the same behavior by passing directories without "
- "the -w argument on the command line, or by using the "
- "--tests argument in a configuration file.",
- DeprecationWarning)
- self.testNames.append(path)
-
- def default(self):
- """Reset all config values to defaults.
- """
- self.__dict__.update(self._default)
-
- def getParser(self, doc=None):
- """Get the command line option parser.
- """
- if self.parser:
- return self.parser
- env = self.env
- parser = self.parserClass(doc)
- parser.add_option(
- "-V","--version", action="store_true",
- dest="version", default=False,
- help="Output nose version and exit")
- parser.add_option(
- "-p", "--plugins", action="store_true",
- dest="showPlugins", default=False,
- help="Output list of available plugins and exit. Combine with "
- "higher verbosity for greater detail")
- parser.add_option(
- "-v", "--verbose",
- action="count", dest="verbosity",
- default=self.verbosity,
- help="Be more verbose. [NOSE_VERBOSE]")
- parser.add_option(
- "--verbosity", action="store", dest="verbosity",
- metavar='VERBOSITY',
- type="int", help="Set verbosity; --verbosity=2 is "
- "the same as -v")
- parser.add_option(
- "-q", "--quiet", action="store_const", const=0, dest="verbosity",
- help="Be less verbose")
- parser.add_option(
- "-c", "--config", action="append", dest="files",
- metavar="FILES",
- help="Load configuration from config file(s). May be specified "
- "multiple times; in that case, all config files will be "
- "loaded and combined")
- parser.add_option(
- "-w", "--where", action="append", dest="where",
- metavar="WHERE",
- help="Look for tests in this directory. "
- "May be specified multiple times. The first directory passed "
- "will be used as the working directory, in place of the current "
- "working directory, which is the default. Others will be added "
- "to the list of tests to execute. [NOSE_WHERE]"
- )
- parser.add_option(
- "--py3where", action="append", dest="py3where",
- metavar="PY3WHERE",
- help="Look for tests in this directory under Python 3.x. "
- "Functions the same as 'where', but only applies if running under "
- "Python 3.x or above. Note that, if present under 3.x, this "
- "option completely replaces any directories specified with "
- "'where', so the 'where' option becomes ineffective. "
- "[NOSE_PY3WHERE]"
- )
- parser.add_option(
- "-m", "--match", "--testmatch", action="store",
- dest="testMatch", metavar="REGEX",
- help="Files, directories, function names, and class names "
- "that match this regular expression are considered tests. "
- "Default: %s [NOSE_TESTMATCH]" % self.testMatchPat,
- default=self.testMatchPat)
- parser.add_option(
- "--tests", action="store", dest="testNames", default=None,
- metavar='NAMES',
- help="Run these tests (comma-separated list). This argument is "
- "useful mainly from configuration files; on the command line, "
- "just pass the tests to run as additional arguments with no "
- "switch.")
- parser.add_option(
- "-l", "--debug", action="store",
- dest="debug", default=self.debug,
- help="Activate debug logging for one or more systems. "
- "Available debug loggers: nose, nose.importer, "
- "nose.inspector, nose.plugins, nose.result and "
- "nose.selector. Separate multiple names with a comma.")
- parser.add_option(
- "--debug-log", dest="debugLog", action="store",
- default=self.debugLog, metavar="FILE",
- help="Log debug messages to this file "
- "(default: sys.stderr)")
- parser.add_option(
- "--logging-config", "--log-config",
- dest="loggingConfig", action="store",
- default=self.loggingConfig, metavar="FILE",
- help="Load logging config from this file -- bypasses all other"
- " logging config settings.")
- parser.add_option(
- "-I", "--ignore-files", action="append", dest="ignoreFiles",
- metavar="REGEX",
- help="Completely ignore any file that matches this regular "
- "expression. Takes precedence over any other settings or "
- "plugins. "
- "Specifying this option will replace the default setting. "
- "Specify this option multiple times "
- "to add more regular expressions [NOSE_IGNORE_FILES]")
- parser.add_option(
- "-e", "--exclude", action="append", dest="exclude",
- metavar="REGEX",
- help="Don't run tests that match regular "
- "expression [NOSE_EXCLUDE]")
- parser.add_option(
- "-i", "--include", action="append", dest="include",
- metavar="REGEX",
- help="This regular expression will be applied to files, "
- "directories, function names, and class names for a chance "
- "to include additional tests that do not match TESTMATCH. "
- "Specify this option multiple times "
- "to add more regular expressions [NOSE_INCLUDE]")
- parser.add_option(
- "-x", "--stop", action="store_true", dest="stopOnError",
- default=self.stopOnError,
- help="Stop running tests after the first error or failure")
- parser.add_option(
- "-P", "--no-path-adjustment", action="store_false",
- dest="addPaths",
- default=self.addPaths,
- help="Don't make any changes to sys.path when "
- "loading tests [NOSE_NOPATH]")
- parser.add_option(
- "--exe", action="store_true", dest="includeExe",
- default=self.includeExe,
- help="Look for tests in python modules that are "
- "executable. Normal behavior is to exclude executable "
- "modules, since they may not be import-safe "
- "[NOSE_INCLUDE_EXE]")
- parser.add_option(
- "--noexe", action="store_false", dest="includeExe",
- help="DO NOT look for tests in python modules that are "
- "executable. (The default on the windows platform is to "
- "do so.)")
- parser.add_option(
- "--traverse-namespace", action="store_true",
- default=self.traverseNamespace, dest="traverseNamespace",
- help="Traverse through all path entries of a namespace package")
- parser.add_option(
- "--first-package-wins", "--first-pkg-wins", "--1st-pkg-wins",
- action="store_true", default=False, dest="firstPackageWins",
- help="nose's importer will normally evict a package from sys."
- "modules if it sees a package with the same name in a different "
- "location. Set this option to disable that behavior.")
-
- self.plugins.loadPlugins()
- self.pluginOpts(parser)
-
- self.parser = parser
- return parser
-
- def help(self, doc=None):
- """Return the generated help message
- """
- return self.getParser(doc).format_help()
-
- def pluginOpts(self, parser):
- self.plugins.addOptions(parser, self.env)
-
- def reset(self):
- self.__dict__.update(self._orig)
-
- def todict(self):
- return self.__dict__.copy()
-
- def update(self, d):
- self.__dict__.update(d)
-
-
-class NoOptions(object):
- """Options container that returns None for all options.
- """
- def __getstate__(self):
- return {}
-
- def __setstate__(self, state):
- pass
-
- def __getnewargs__(self):
- return ()
-
- def __getattr__(self, attr):
- return None
-
- def __nonzero__(self):
- return False
-
-
-def user_config_files():
- """Return path to any existing user config files
- """
- return filter(os.path.exists,
- map(os.path.expanduser, config_files))
-
-
-def all_config_files():
- """Return path to any existing user config files, plus any setup.cfg
- in the current working directory.
- """
- user = user_config_files()
- if os.path.exists('setup.cfg'):
- return user + ['setup.cfg']
- return user
-
-
-# used when parsing config files
-def flag(val):
- """Does the value look like an on/off flag?"""
- if val == 1:
- return True
- elif val == 0:
- return False
- val = str(val)
- if len(val) > 5:
- return False
- return val.upper() in ('1', '0', 'F', 'T', 'TRUE', 'FALSE', 'ON', 'OFF')
-
-
-def _bool(val):
- return str(val).upper() in ('1', 'T', 'TRUE', 'ON')
View
324 env/lib/python2.7/site-packages/nose/core.py
@@ -1,324 +0,0 @@
-"""Implements nose test program and collector.
-"""
-from __future__ import generators
-
-import logging
-import os
-import sys
-import time
-import unittest
-
-from nose.config import Config, all_config_files
-from nose.loader import defaultTestLoader
-from nose.plugins.manager import PluginManager, DefaultPluginManager, \
- RestrictedPluginManager
-from nose.result import TextTestResult
-from nose.suite import FinalizingSuiteWrapper
-from nose.util import isclass, tolist
-
-
-log = logging.getLogger('nose.core')
-compat_24 = sys.version_info >= (2, 4)
-
-__all__ = ['TestProgram', 'main', 'run', 'run_exit', 'runmodule', 'collector',
- 'TextTestRunner']
-
-
-class TextTestRunner(unittest.TextTestRunner):
- """Test runner that uses nose's TextTestResult to enable errorClasses,
- as well as providing hooks for plugins to override or replace the test
- output stream, results, and the test case itself.
- """
- def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1,
- config=None):
- if config is None:
- config = Config()
- self.config = config
- unittest.TextTestRunner.__init__(self, stream, descriptions, verbosity)
-
-
- def _makeResult(self):
- return TextTestResult(self.stream,
- self.descriptions,
- self.verbosity,
- self.config)
-
- def run(self, test):
- """Overrides to provide plugin hooks and defer all output to
- the test result class.
- """
- wrapper = self.config.plugins.prepareTest(test)
- if wrapper is not None:
- test = wrapper
-
- # plugins can decorate or capture the output stream
- wrapped = self.config.plugins.setOutputStream(self.stream)
- if wrapped is not None:
- self.stream = wrapped
-
- result = self._makeResult()
- start = time.time()
- test(result)
- stop = time.time()
- result.printErrors()
- result.printSummary(start, stop)
- self.config.plugins.finalize(result)
- return result
-
-
-class TestProgram(unittest.TestProgram):
- """Collect and run tests, returning success or failure.
-
- The arguments to TestProgram() are the same as to
- :func:`main()` and :func:`run()`:
-
- * module: All tests are in this module (default: None)
- * defaultTest: Tests to load (default: '.')
- * argv: Command line arguments (default: None; sys.argv is read)
- * testRunner: Test runner instance (default: None)
- * testLoader: Test loader instance (default: None)
- * env: Environment; ignored if config is provided (default: None;
- os.environ is read)
- * config: :class:`nose.config.Config` instance (default: None)
- * suite: Suite or list of tests to run (default: None). Passing a
- suite or lists of tests will bypass all test discovery and
- loading. *ALSO NOTE* that if you pass a unittest.TestSuite
- instance as the suite, context fixtures at the class, module and
- package level will not be used, and many plugin hooks will not
- be called. If you want normal nose behavior, either pass a list
- of tests, or a fully-configured :class:`nose.suite.ContextSuite`.
- * exit: Exit after running tests and printing report (default: True)
- * plugins: List of plugins to use; ignored if config is provided
- (default: load plugins with DefaultPluginManager)
- * addplugins: List of **extra** plugins to use. Pass a list of plugin
- instances in this argument to make custom plugins available while
- still using the DefaultPluginManager.
- """
- verbosity = 1
-
- def __init__(self, module=None, defaultTest='.', argv=None,
- testRunner=None, testLoader=None, env=None, config=None,
- suite=None, exit=True, plugins=None, addplugins=None):
- if env is None:
- env = os.environ
- if config is None:
- config = self.makeConfig(env, plugins)
- if addplugins:
- config.plugins.addPlugins(addplugins)
- self.config = config
- self.suite = suite
- self.exit = exit
- extra_args = {}
- version = sys.version_info[0:2]
- if version >= (2,7) and version != (3,0):
- extra_args['exit'] = exit
- unittest.TestProgram.__init__(
- self, module=module, defaultTest=defaultTest,
- argv=argv, testRunner=testRunner, testLoader=testLoader,
- **extra_args)
-
- def makeConfig(self, env, plugins=None):
- """Load a Config, pre-filled with user config files if any are
- found.
- """
- cfg_files = all_config_files()
- if plugins:
- manager = PluginManager(plugins=plugins)
- else:
- manager