bitprophet/spec — Issue #15: Ignore pyc files in SpecSelector#wantFile
Author: yanne
Created: 2011-11-11 06:47:11+00:00
State: open

It seems that `pyc` files are offered to `#wantFile`, even after the module has been accepted by `#wantModule`.

➜ tree tests
tests
└── test.py

0 directories, 1 file

➜ spec

Test
- test

Ran 1 test in 0.004 seconds
OK

➜ tree tests
tests
├── test.py
└── test.pyc

0 directories, 2 files

➜ spec

Test
- test

Unloadable or unexecutable test.

A Failure case is placed in a test suite to indicate the presence of a
test that could not be loaded or executed. A common example is a test
module that fails to import.
- runTest (ERROR)

======================================================================
ERROR: Failure: ValueError (Unable to load tests from file /home/janne/tmp/tests/test.pyc)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/usr/lib/python2.7/site-packages/nose/loader.py", line 213, in loadTestsFromFile
% filename)
ValueError: Unable to load tests from file /home/janne/tmp/tests/test.pyc

Ran 2 tests in 0.008 seconds
FAILED (failures=0, errors=1, skipped=0)