Hi,
I've made a Hello World application following the steps from here
http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/project.html
All was good until I ran the tests at which point I got this:
(pyramid)yoshi@foo ~/public_html/PyramidTestProject $ python setup.py
> test
> running test
> running egg_info
> writing requirements to PyramidTestProject.egg-info/requires.txt
> writing PyramidTestProject.egg-info/PKG-INFO
> writing top-level names to PyramidTestProject.egg-info/top_level.txt
> writing dependency_links to
> PyramidTestProject.egg-info/dependency_links.txt
> writing entry points to PyramidTestProject.egg-info/entry_points.txt
> reading manifest file 'PyramidTestProject.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> warning: no files found matching '*.rst'
> warning: no files found matching '*.ico' under directory
> 'pyramidtestproject'
> warning: no files found matching '*.gif' under directory
> 'pyramidtestproject'
> warning: no files found matching '*.jpg' under directory
> 'pyramidtestproject'
> warning: no files found matching '*.txt' under directory
> 'pyramidtestproject'
> warning: no files found matching '*.mak' under directory
> 'pyramidtestproject'
> warning: no files found matching '*.mako' under directory
> 'pyramidtestproject'
> warning: no files found matching '*.js' under directory
> 'pyramidtestproject'
> warning: no files found matching '*.html' under directory
> 'pyramidtestproject'
> warning: no files found matching '*.xml' under directory
> 'pyramidtestproject'
> writing manifest file 'PyramidTestProject.egg-info/SOURCES.txt'
> running build_ext
> Traceback (most recent call last):
> File "setup.py", line 41, in <module>
> """,
> File "/usr/lib64/python2.6/distutils/core.py", line 152, in setup
> dist.run_commands()
> File "/usr/lib64/python2.6/distutils/dist.py", line 975, in run_commands
> self.run_command(cmd)
> File "/usr/lib64/python2.6/distutils/dist.py", line 995, in run_command
> cmd_obj.run()
> File
> "/home/yoshi/envs/pyramid/lib/python2.6/site-packages/setuptools/command/test.py",
>
> line 138, in run
> self.with_project_on_sys_path(self.run_tests)
> File
> "/home/yoshi/envs/pyramid/lib/python2.6/site-packages/setuptools/command/test.py",
>
> line 118, in with_project_on_sys_path
> func()
> File
> "/home/yoshi/envs/pyramid/lib/python2.6/site-packages/setuptools/command/test.py",
>
> line 164, in run_tests
> testLoader = cks
> File "/usr/lib64/python2.6/unittest.py", line 816, in __init__
> self.parseArgs(argv)
> File "/usr/lib64/python2.6/unittest.py", line 843, in parseArgs
> self.createTests()
> File "/usr/lib64/python2.6/unittest.py", line 849, in createTests
> self.module)
> File "/usr/lib64/python2.6/unittest.py", line 613, in loadTestsFromNames
> suites = [self.loadTestsFromName(name, module) for name in names]
> File "/usr/lib64/python2.6/unittest.py", line 587, in loadTestsFromName
> return self.loadTestsFromModule(obj)
> File
> "/home/yoshi/envs/pyramid/lib/python2.6/site-packages/setuptools/command/test.py",
>
> line 35, in loadTestsFromModule
> tests.append(self.loadTestsFromName(submodule))
> File "/usr/lib64/python2.6/unittest.py", line 576, in loadTestsFromName
> module = __import__('.'.join(parts_copy))
> ValueError: Empty module name
>
If I use nose to run the tests there are no errors.
The tests are only those autogenerated by pcreate:
import unittest
>
> from pyramid import testing
>
>
> class ViewTests(unittest.TestCase):
> def setUp(self):
> self.config = testing.setUp()
>
> def tearDown(self):
> testing.tearDown()
>
> def test_my_view(self):
> from .views import my_view
> request = testing.DummyRequest()
> info = my_view(request)
> self.assertEqual(info['project'], 'PyramidTestProject')
>
Is there any way to fix this and run the tests without using nose?
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/groups/opt_out.