|
Revision 97, 0.6 kB
(checked in by mk, 6 years ago)
|
Search for classes that define special methods (like setUp/tearDown) and files that match test_* or *_test and assume they contain unit tests.
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
import os |
|---|
| 3 |
|
|---|
| 4 |
if 'set' not in dir(__builtins__): |
|---|
| 5 |
from sets import Set as set |
|---|
| 6 |
|
|---|
| 7 |
DATA_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '../data/')) |
|---|
| 8 |
|
|---|
| 9 |
class Glutton(object): |
|---|
| 10 |
"Eat everything." |
|---|
| 11 |
def __getattr__(self, name): |
|---|
| 12 |
return Glutton() |
|---|
| 13 |
|
|---|
| 14 |
def __setattr__(self, name, value): |
|---|
| 15 |
pass |
|---|
| 16 |
|
|---|
| 17 |
def __call__(self, *args, **kwds): |
|---|
| 18 |
pass |
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
def create_empty_file(file_path): |
|---|
| 22 |
fd = file(file_path, "w") |
|---|
| 23 |
fd.close() |
|---|
| 24 |
|
|---|
| 25 |
def create_empty_files_in_directory(files, directory): |
|---|
| 26 |
for filename in files: |
|---|
| 27 |
create_empty_file(os.path.join(directory, filename)) |
|---|