Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Pyramid Unittesting my application
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rescommues  
View profile  
 More options Sep 15 2011, 11:26 am
From: Rescommues <n...@rescommunes.ca>
Date: Thu, 15 Sep 2011 08:26:36 -0700 (PDT)
Local: Thurs, Sep 15 2011 11:26 am
Subject: Pyramid Unittesting my application
I am using pyramid 1.2b2 and have some unittests I'd like to run. But
I can not get past the error below.
I started my project with sqlalchemy scaffolding.
I have created a simple unit tests (starting point actually) in
tests.py which looks like this:

import unittest
from pyramid.config import Configurator
from pyramid import testing

class testBasic( unittest.TestCase ):
    def setUp( self ):
        self.config = testing.setUp( )

    def tearDown( self ):
        testing.tearDown( )

    def test_first_last( self ):
        pass

In the errors it seems that something is wrong with
"paster_plugins=['pyramid']" in setup.py.
I should note that "python setup.py develop" executes successfully.

This is the result when I run the test:

(ENV2)rescommunes@snax ~/development/Shad $ python setup.py test -q
running test
running egg_info
writing requirements to sha.egg-info/requires.txt
writing Shad.egg-info/PKG-INFO
writing top-level names to Shad.egg-info/top_level.txt
writing dependency_links to Shad.egg-info/dependency_links.txt
writing entry points to Shad.egg-info/entry_points.txt
writing paster_plugins to Shad.egg-info/paster_plugins.txt
reading manifest file 'Shad.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'Shad.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
  File "setup.py", line 51, in <module>
    paster_plugins=['pyramid'],
  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in
run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in
run_command
    cmd_obj.run()
  File "build/bdist.linux-i686/egg/setuptools/command/test.py", line
121, in run
  File "build/bdist.linux-i686/egg/setuptools/command/test.py", line
101, in with_project_on_sys_path
  File "build/bdist.linux-i686/egg/setuptools/command/test.py", line
130, in run_tests
  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 103, in
loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "build/bdist.linux-i686/egg/setuptools/command/test.py", line
34, in loadTestsFromModule
  File "/usr/lib/python2.7/unittest/loader.py", line 103, in
loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "build/bdist.linux-i686/egg/setuptools/command/test.py", line
34, in loadTestsFromModule
  File "/usr/lib/python2.7/unittest/loader.py", line 103, in
loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "build/bdist.linux-i686/egg/setuptools/command/test.py", line
34, in loadTestsFromModule
  File "/usr/lib/python2.7/unittest/loader.py", line 91, in
loadTestsFromName
    module = __import__('.'.join(parts_copy))
ValueError: Empty module name

Any suggestions would be great.
Thank You.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris McDonough  
View profile  
 More options Sep 15 2011, 12:28 pm
From: Chris McDonough <chr...@plope.com>
Date: Thu, 15 Sep 2011 12:28:48 -0400
Local: Thurs, Sep 15 2011 12:28 pm
Subject: Re: Pyramid Unittesting my application

The default test runner is easily confused and outputs very poor error
messages.  You might try using the Nose testrunner instead.  Do
"easy_install nose" in your virtualenv, then run "setup.py nosetests"
instead of "setup.py test".  It will likely fail, but it will provide a
better error message.

- C


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rescommues  
View profile  
 More options Sep 15 2011, 12:36 pm
From: Rescommues <n...@rescommunes.ca>
Date: Thu, 15 Sep 2011 09:36:26 -0700 (PDT)
Local: Thurs, Sep 15 2011 12:36 pm
Subject: Re: Pyramid Unittesting my application
Thanks, this allows me to run my tests.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »