[TIP] FW: [newbie] Does nosier support unittest?

meme dough memedough at gmail.com
Thu Nov 29 01:42:44 PST 2012


Hi,

nosier will run any command you give it.  work with unittest, nose,
pytest or any command.

the command "python test_convert_html.py" worked for you

nosier run command with files changed "python ./test_convert_html.py ./4913"

./4913 cause trouble?  you run "python ./test_convert_html.py ./4913"
on command line no work for you?

try run "nosier python test_convert_html.py"

:)

On 28 November 2012 17:40, Dan Knierim <dan_knierim at hotmail.com> wrote:
>
> Hello Meme,
>
> I like the nosier interface from reading the overview page.  But I've hit a snag on my first try using it.  Could easily be a newbie goof...
>
> If you'd rather have me handle my nosier questions some other way, I'll follow your suggestion.  For instance should I file an issue on the bitbucket project page?
>
> Thanks,
> Dan K.
>
>
> ----------------------------------------
>> From: dan_knierim at hotmail.com
>> To: testing-in-python at lists.idyll.org
>> Subject: [newbie] Does nosier support unittest?
>> Date: Sun, 25 Nov 2012 21:29:17 -0800
>>
>>
>> Hello Python Testers,
>>
>> I just installed nosier, and bumped into an issue running unittest-based tests with it.
>>
>> ----- begin install session excerpt -----
>> root# pip install nosier
>> Downloading/unpacking nosier
>>   Downloading nosier-1.1.tar.gz
>>   Running setup.py egg_info for package nosier
>>
>> Requirement already satisfied (use --upgrade to upgrade): inotifyx in /home/dknierim/.local/lib/python2.7/site-packages (from nosier)
>> Installing collected packages: nosier
>>   Running setup.py install for nosier
>>
>>     Installing nosier script to /usr/local/bin
>> Successfully installed nosier
>> Cleaning up...
>> root#
>> ----- end install session excerpt -----
>>
>>
>> ----- begin nosier use session excerpt -----
>> dknierim$ cd ~/Project/tests
>> dknierim$ tail -5 test_convert_html.py
>>
>> ############################################################
>> if __name__ == '__main__':
>>     unittest.main()
>>
>> dknierim$ python test_convert_html.py
>> ssssssssssssssssssssss......s
>> ----------------------------------------------------------------------
>> Ran 29 tests in 0.008s
>>
>> OK (skipped=23)
>> dknierim$ nosier -ar python
>> Setting up monitoring of paths
>> Monitoring 13 paths
>> ...[nosier apparently waiting for change in monitored files]...
>> ...[I re-saved the test file ~/Project/tests/test_convert_html.py without changes in a separate session]...
>> ================================================================================
>> Run Number : 1
>> Files      : ./test_convert_html.py ./4913
>> Command    : python ./test_convert_html.py ./4913
>>
>> Traceback (most recent call last):
>>   File "./test_convert_html.py", line 1178, in <module>
>>     unittest.main()
>>   File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
>>     self.parseArgs(argv)
>>   File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
>>     self.createTests()
>>   File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
>>     self.module)
>>   File "/usr/lib/python2.7/unittest/loader.py", line 128, in loadTestsFromNames
>>     suites = [self.loadTestsFromName(name, module) for name in names]
>>   File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
>>     parent, obj = obj, getattr(obj, part)
>> AttributeError: 'module' object has no attribute ''
>>
>> --------------------------------------------------------------------------------
>> ...[nosier waiting]...
>> ...[killed with Ctl-C]...
>>
>> dknierim$ python -V
>> Python 2.7.2+
>> dknierim$ uname -a
>> Linux HPPavilionDV9723cl 3.0.0-27-generic #44-Ubuntu SMP Tue Oct 16 16:53:47 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
>> ----- end session excerpt -----
>>
>> I've tried a few things, but before I go on and on --
>>
>> Does nosier support unittest?  Are there any special configuration requirements for using them together?
>>
>> If nosier does support unittest, what are the first troubleshooting steps I should try?
>>
>> Where else should I look for info on nosier?
>>
>> Thanks,
>> Dan K.
>>
>>
>



More information about the testing-in-python mailing list