rlisagor / freshen

Clone of the Cucumber BDD framework for Python
GNU General Public License v3.0
359 stars 56 forks source link

Unable to run freshen? #6

Closed leeola closed 13 years ago

leeola commented 14 years ago

I haven't seen a mailing list or any contact information, so i apologize if this is not where discussion is intended. Hopefully this is a bug of some sort :P

Anyway, i seem unable to run freshen with the simple calculator example. Any idea why? Here is my terminal screen after attempting to run freshen. Note that i put the init's in there just to try and figure out what is going on. Oddly enough, they are being compiled, and neither calulator.py nor steps.py are, as seen by the pyc..

(env)me@mine:~/projects/freshen_tests/basic_001$ ls -l
total 5
-rwxrwxrwx 1 me me  281 2010-08-14 18:28 calculator.py
drwx------ 1 me me 4096 2010-08-15 16:15 features
-rwxrwxrwx 1 me me  0 2010-08-15 16:14 __init__.py
-rwxrwxrwx 1 me me  147 2010-08-15 16:15 __init__.pyc
(env)me@mine:~/projects/freshen_tests/basic_001$ ls -l ./features/
total 3
-rwxrwxrwx 1 me me 529 2010-08-14 18:31 addition.feature
-rwxrwxrwx 1 me me 295 2010-08-14 18:33 division.feature
-rwxrwxrwx 1 me me   0 2010-08-15 16:14 __init__.py
-rwxrwxrwx 1 me me 156 2010-08-15 16:15 __init__.pyc
-rwxrwxrwx 1 me me 468 2010-08-14 18:32 steps.py
(env)me@mine:~/projects/freshen_tests/basic_001$ nosetests --with-freshen -v

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
(env)me@mine:~/projects/freshen_tests/basic_001$ cd features/
(env)me@mine:~/projects/freshen_tests/basic_001/features$ nosetests --with-freshen -v

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
(env)me@mine:~/projects/freshen_tests/basic_001/features$ 

So yea.. if it was at least an error i could work with it... but i have no idea what is actually wrong, aside from nothingness.

So yea, any help would be much appreciated.

Update: Alright, i seem to be doing something wrong? I found it works great if i define every single feature file.. manually

rlisagor commented 14 years ago

Hmm, that should work. Could you please post the log output? To obtain it, you can use

nosetests --with-freshen -v -l nose

Another thing to try is to explicitly include the path to the directory with the feature files. Like so:

nosetests --with-freshen -v features
leeola commented 14 years ago

Log: (env)me@mine:~/projects/freshen_tests/basic_001$ ls -l total 9 -rwxrwxrwx 1 me me 283 2010-08-15 16:55 calculator.py -rwxrwxrwx 1 me me 1161 2010-08-15 16:55 calculator.pyc drwx------ 1 me me 4096 2010-08-15 16:54 features -rwxrwxrwx 1 me me 0 2010-08-15 16:14 init.py -rwxrwxrwx 1 me me 147 2010-08-15 16:15 init.pyc (env)me@mine:~/projects/freshen_tests/basic_001$ nosetests --with-freshen -v -l nose nose.plugins.manager: DEBUG: Configuring plugins nose.plugins.manager: DEBUG: Plugins enabled: [<nose.plugins.capture.Capture object at 0x1ee0750>, <nose.plugins.logcapture.LogCapture object at 0x1ee0790>, <nose.plugins.deprecated.Deprecated object at 0x1ee0910>, <nose.plugins.skip.Skip object at 0x20c9dd0>, <freshen.noseplugin.FreshenNosePlugin object at 0x237ed10>, <freshen.noseplugin.FreshenErrorPlugin object at 0x23b7610>] nose.core: DEBUG: configured Config(addPaths=True, args=(), configSection='nosetests', debug='nose', debugLog=None, env={}, exclude=None, files=[], firstPackageWins=False, getTestCaseNamesCompat=False, ignoreFiles=(<_sre.SRE_Pattern object at 0x1ea23b0>, <_sre.SRE_Pattern object at 0x1ea2420>, <_sre.SRE_Pattern object at 0x1eb1c90>), include=None, includeExe=False, logStream=<open file '', mode 'w' at 0x7f2f989f7210>, loggingConfig=None, options=<Values at 0x23bf518: {'doctest_tests': None, 'loggingConfig': None, 'doctestExtension': None, 'enable_plugin_xunit': None, 'logcapture_clear': False, 'enable_plugin_id': None, 'testNames': None, 'exclude': [], 'stopOnError': False, 'logcapture': True, 'addPaths': True, 'capture': True, 'cover_html': None, 'noSkip': False, 'enable_plugin_isolation': None, 'logcapture_filters': None, 'collect_only': None, 'enable_plugin_allmodules': None, 'failed': False, 'version': False, 'enable_plugin_freshen': True, 'eval_attr': None, 'includeExe': False, 'include': [], 'enable_plugin_profile': None, 'debugErrors': False, 'files': None, 'multiprocess_timeout': 10, 'traverseNamespace': False, 'doctest_result_var': None, 'tags': None, 'profile_sort': 'cumulative', 'firstPackageWins': False, 'cover_html_dir': 'cover', 'logcapture_datefmt': None, 'xunit_file': 'nosetests.xml', 'showPlugins': False, 'cover_erase': None, 'multiprocess_workers': 0, 'testIdFile': '.noseids', 'enable_plugin_coverage': None, 'attr': None, 'language': 'en', 'doctestFixtures': None, 'cover_packages': None, 'profile_restrict': None, 'enable_plugin_doctest': None, 'profile_stats_file': None, 'cover_inclusive': None, 'noDeprecated': False, 'logcaptureformat': '%(name)s: %(levelname)s: %(message)s', 'debugFailures': False, 'detailedErrors': None, 'debugLog': None, 'testMatch': '(?:^|[\b./-])[Tt]est', 'debug': 'nose', 'where': None, 'cover_tests': None, 'verbosity': 2}>, parser=<optparse.OptionParser instance at 0x1edfbd8>, parserClass=<class optparse.OptionParser at 0x7f2f9739c530>, plugins=<nose.plugins.manager.DefaultPluginManager object at 0x1eb2f90>, runOnInit=True, srcDirs=('lib', 'src'), stopOnError=False, stream=<open file '', mode 'w' at 0x7f2f989f7210>, testMatch=<_sre.SREPattern object at 0x7f2f988bf7b0>, testMatchPat='(?:^|[\b./-])[Tt]est', testNames=[], traverseNamespace=False, verbosity=2, where=(), worker=False, workingDir='~/projects/freshen_tests/basic_001') nose.importer: DEBUG: Add path ~/projects/freshen_tests/basic_001 nose.importer: DEBUG: Add path ~/projects/freshen_tests nose.importer: DEBUG: insert ~/projects/freshen_tests into sys.path nose.core: DEBUG: test loader is <nose.loader.TestLoader object at 0x23cc090> nose.core: DEBUG: defaultTest . nose.core: DEBUG: Test names are ['.'] nose.core: DEBUG: createTests called with None nose.loader: DEBUG: load from . (None) nose.plugins.freshen: DEBUG: Loading from name . nose.selector: DEBUG: Test name . resolved to file ., module None, call None nose.selector: DEBUG: Final resolution of test name .: file ~/projects/freshen_tests/basic_001 module basic_001 call None nose.importer: DEBUG: Import basic_001 from ~/projects/freshen_tests nose.importer: DEBUG: Add path ~/projects/freshen_tests nose.importer: DEBUG: find module part basic_001 (basic_001) in ['~/projects/freshen_tests'] nose.loader: DEBUG: Load from module <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> nose.loader: DEBUG: Load tests from module path ~/projects/freshen_tests/basic_001? nose.loader: DEBUG: path: ~/projects/freshen_tests/basic_001 os.path.realpath(~/projects/freshen_tests/basic_001): ~/projects/freshen_tests/basic_001 nose.loader: DEBUG: load from dir ~/projects/freshen_tests/basic_001 nose.importer: DEBUG: Add path ~/projects/freshen_tests/basic_001 nose.importer: DEBUG: Add path ~/projects/freshen_tests nose.selector: DEBUG: init.py matches ignoreFiles pattern; skipped nose.selector: DEBUG: init.pyc matches ignoreFiles pattern; skipped nose.selector: INFO: ~/projects/freshen_tests/basic_001/calculator.py is executable; skipped nose.selector: INFO: ~/projects/freshen_tests/basic_001/calculator.pyc is executable; skipped nose.selector: DEBUG: Plugin setting selection of ~/projects/freshen_tests/basic_001/features to True nose.selector: DEBUG: wantDirectory ~/projects/freshen_tests/basic_001/features? True nose.loader: DEBUG: load from ~/projects/freshen_tests/basic_001/features (None) nose.plugins.freshen: DEBUG: Loading from name ~/projects/freshen_tests/basic_001/features nose.selector: DEBUG: Test name ~/projects/freshen_tests/basic_001/features resolved to file ~/projects/freshen_tests/basic_001/features, module None, call None nose.selector: DEBUG: Final resolution of test name ~/projects/freshen_tests/basic_001/features: file ~/projects/freshen_tests/basic_001/features module basic_001.features call None nose.importer: DEBUG: Import basic_001.features from ~/projects/freshen_tests nose.importer: DEBUG: Add path ~/projects/freshen_tests nose.importer: DEBUG: find module part basic_001 (basic_001) in ['~/projects/freshen_tests'] nose.importer: DEBUG: sys.modules has basic_001 as <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> nose.importer: DEBUG: module already loaded? mod: ~/projects/freshen_tests new: ~/projects/freshen_tests nose.importer: DEBUG: find module part features (basic_001.features) in ['~/projects/freshen_tests/basic_001'] nose.loader: DEBUG: Load from module <module 'basic_001.features' from '~/projects/freshen_tests/basic_001/features/init.pyc'> nose.selector: DEBUG: wantModule <module 'basic_001.features' from '~/projects/freshen_tests/basic_001/features/init.pyc'>? False nose.loader: DEBUG: Load tests from module path ~/projects/freshen_tests/basic_001/features? nose.loader: DEBUG: path: ~/projects/freshen_tests/basic_001/features os.path.realpath(~/projects/freshen_tests/basic_001/features): ~/projects/freshen_tests/basic_001/features nose.loader: DEBUG: load from dir ~/projects/freshen_tests/basic_001/features nose.importer: DEBUG: Add path ~/projects/freshen_tests/basic_001/features nose.importer: DEBUG: Add path ~/projects/freshen_tests/basic_001 nose.importer: DEBUG: Add path ~/projects/freshen_tests nose.selector: DEBUG: init.py matches ignoreFiles pattern; skipped nose.selector: DEBUG: init.pyc matches ignoreFiles pattern; skipped nose.selector: INFO: ~/projects/freshen_tests/basic_001/features/addition.feature is executable; skipped nose.selector: INFO: ~/projects/freshen_tests/basic_001/features/division.feature is executable; skipped nose.selector: INFO: ~/projects/freshen_tests/basic_001/features/steps.py is executable; skipped nose.selector: INFO: ~/projects/freshen_tests/basic_001/features/steps.pyc is executable; skipped nose.suite: DEBUG: Create suite for <nose.suite.ContextList object at 0x23cc3d0> nose.suite: DEBUG: tests <nose.suite.ContextList object at 0x23cc3d0> context <module 'basic_001.features' from '~/projects/freshen_tests/basic_001/features/init.pyc'> nose.suite: DEBUG: Context suite for <nose.suite.ContextList object at 0x23cc3d0> (<module 'basic_001.features' from '~/projects/freshen_tests/basic_001/features/init.pyc'>) (37537808) nose.suite: DEBUG: suite has context basic_001.features nose.suite: DEBUG: get ancestry <module 'basic_001.features' from '~/projects/freshen_tests/basic_001/features/init.pyc'> nose.suite: DEBUG: <module 'basic_001.features' from '~/projects/freshen_tests/basic_001/features/init.pyc'> ancestors ['basic_001'] nose: DEBUG: import basic_001 nose: DEBUG: resolve: [], basic_001, <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'>, <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> nose.suite: DEBUG: suite has ancestor basic_001 nose.suite: DEBUG: Create suite for <nose.suite.ContextList object at 0x23cc350> nose.suite: DEBUG: tests <nose.suite.ContextList object at 0x23cc350> context <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> nose.suite: DEBUG: Context suite for <nose.suite.ContextList object at 0x23cc350> (<module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'>) (37537488) nose.suite: DEBUG: suite has context basic_001 nose.suite: DEBUG: get ancestry <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> nose.suite: DEBUG: Create suite for [] nose.suite: DEBUG: tests [] context None nose.suite: DEBUG: wrap [] nose.suite: DEBUG: tests in 37537488? nose.suite: DEBUG: wrapping nose.suite: DEBUG: Context suite for [](module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc') (37535952) nose.suite: DEBUG: suite has context basic_001 nose.suite: DEBUG: get ancestry <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> nose.core: DEBUG: runTests called nose.suite: DEBUG: suite 37535952 () run called, tests: <generator object at 0x25267e8> nose.suite: DEBUG: suite 37535952 setUp called, tests: <generator object at 0x25267e8> nose.suite: DEBUG: tests in 37535952? nose.suite: DEBUG: ancestor <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> may need setup nose.suite: DEBUG: ancestor <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> does need setup nose.suite: DEBUG: setup context <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> nose.suite: DEBUG: completed suite setup nose.suite: DEBUG: precache is [] nose.suite: DEBUG: suite 37537488 () run called, tests: <generator object at 0x2526a28> nose.suite: DEBUG: suite 37537488 setUp called, tests: <generator object at 0x2526a28> nose.suite: DEBUG: tests in 37537488? nose.suite: DEBUG: ancestor <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> may need setup nose.suite: DEBUG: completed suite setup nose.suite: DEBUG: precache is [] nose.suite: DEBUG: suite 37537808 () run called, tests: <generator object at 0x25269e0> nose.suite: DEBUG: suite 37537808 setUp called, tests: <generator object at 0x25269e0> nose.suite: DEBUG: tests in 37537808? nose.suite: DEBUG: suite 37537808 has no tests nose.suite: DEBUG: precache is [] nose.suite: DEBUG: context teardown nose.suite: DEBUG: No reason to teardown (was_setup? False was_torndown? False) nose.suite: DEBUG: context teardown nose.suite: DEBUG: ancestor <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> may need teardown nose.suite: DEBUG: setup ancestor <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> nose.suite: DEBUG: ancestor <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> may need teardown nose.suite: DEBUG: setup ancestor <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> nose.suite: DEBUG: context teardown nose.suite: DEBUG: ancestor <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> may need teardown nose.suite: DEBUG: setup ancestor <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> nose.suite: DEBUG: teardown context <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> nose.suite: DEBUG: ancestor <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> may need teardown nose.suite: DEBUG: ancestor <module 'basic_001' from '~/projects/freshen_tests/basic_001/init.pyc'> already torn down

----------------------------------------------------------------------
Ran 0 tests in 0.002s

OK
(env)me@mine:~/projects/freshen_tests/basic_001$

and here is calling the directory, then a file.

(env)me@mine:~/projects/freshen_tests/basic_001$ nosetests --with-freshen -v features

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

(env)me@mine:~/projects/freshen_tests/basic_001$ nosetests --with-freshen -v features/division.feature 
Division: Regular numbers ... ok

----------------------------------------------------------------------
Ran 1 test in 0.001s

OK
(env)me@mine:~/projects/freshen_tests/basic_001$ 
rlisagor commented 14 years ago

Ok, I see the problem now. Nose doesn't like loading tests from files which are marked as executable unless you specify them by name. If you remove the execute permission from the .feature files, this problem should go away.

Please let me know if you continue seeing this.

leeola commented 14 years ago

Crap.. any idea how it can be fixed without changing the chmod?

It is an NTFS external drive i work off of, so it won't support proper permissions to my knowledge..

rlisagor commented 14 years ago

Yes, you should be able to pass --exe to nosetests to make it look in executable modules.

leeola commented 14 years ago

Ok, sorry for the delay.

I ended up getting sick of my NTFS drive situation and ended up formatting and junk. Due to the the complexity of my setup, ext3 is not the best option, so it was a whole ordeal heh.

Anyway, i managed to get the permission changed to -x and it worked great! Thanks :) I very much look forward to the next releases!

On a side note, are there any mailing lists/irc channels to go to for a community, or at least to communicate to the developer(s)?

ghost commented 13 years ago

You can go to the ruby cucumber/rspec community for most questions.

rlisagor commented 13 years ago

I'm working on setting up a mailing list. Once it is setup, I will post it at the front of the docs.