DISQUS

DISQUS Hello!  The comments on this profile are unclaimed and thus are unverified.

Do they belong to you? Claim these comments.

Stan's picture

Unregistered

Feeds

aliases

  • Stan

Stan

1 year ago

in What are your favorite nose plugins? How do you run Nose? on jessenoller.com comments
Well, all of the indenting was lost, but you get the idea.

1 year ago

in What are your favorite nose plugins? How do you run Nose? on jessenoller.com comments
--pdb-failures is extremely useful for introspecting objects right when a unit test fails. Usually I can figure out what went wrong pretty quick thanks to this.

I also use nose to drive twill-based website unit tests:
(not sure how well this will paste)

# test.py
import twill, glob
from StringIO import StringIO
from nose import with_setup

def setup():
outp = StringIO()
twill.set_output(outp)

def run_twill(twill_file):
script = file(twill_file).read()
twill.execute_string('reset_browser')
twill.execute_string(script)

@with_setup(setup)
def test_twill():
for filename in glob.glob('*.twill'):
yield run_twill, filename
### EOF

Now you can put all of your website tests into .twill files in the current directory. I suppose this could be made into a nose plugin...
1 reply
Stan Well, all of the indenting was lost, but you get the idea.

1 year ago

in My Python maxes out my cpus… on jessenoller.com comments
Time for quad core!
1 reply
jnoller's picture
jnoller Using my little test app, I could really abuse $N cores by simply increasing the worker count and workload - it scales as far as I need it to right now.
Returning? Login