3
Q'ícþ# ã @ sà d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZmZ d dl m
Z
d dlmZ d dlm
Z
d dlmZmZ d dlmZmZmZmZmZmZmZmZmZ d dlmZ G d d
d
eZG dd deZG d
d deZ dS )é N)ÚDistutilsErrorÚDistutilsOptionError)Úlog)Ú
TestLoader)Úsix)ÚmapÚfilter) Úresource_listdirÚresource_existsÚnormalize_pathÚworking_setÚ_namespace_packagesÚevaluate_markerÚadd_activation_listenerÚrequireÚ
EntryPoint)ÚCommandc @ s e Zd Zdd ZdddZdS )ÚScanningLoaderc C s t j| t | _d S )N)r Ú__init__ÚsetÚ_visited)Úself© r ú=/tmp/pip-build-l_bcah40/setuptools/setuptools/command/test.pyr s
zScanningLoader.__init__Nc C sæ || j krdS | j j| g }|jtj| | t|drH|j|j t|drÄxpt|jdD ]`}|j dr|dkr|jd |dd
}n"t
|j|d r`|jd | }nq`|j| j| q`W t|d
krÚ| j
|S |d S dS )
a Return a suite of all tests cases contained in the given module
If the module is a package, load tests from all the modules in it.
If the module has an ``additional_tests`` function, call it and add
the return value to the tests.
NÚadditional_testsÚ__path__Ú z.pyz__init__.pyÚ.é z/__init__.pyé r éýÿÿÿ)r ÚaddÚappendr ÚloadTestsFromModuleÚhasattrr r Ú__name__Úendswithr