Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run tests from source using python 2.7 #6

Open
srikanth-viswanathan opened this issue Sep 29, 2015 · 8 comments
Open

Can't run tests from source using python 2.7 #6

srikanth-viswanathan opened this issue Sep 29, 2015 · 8 comments

Comments

@srikanth-viswanathan
Copy link

Can't run tests from source. I do:

git clone https://github.com/linkedin/simoorg.git
cd simoorg
python setup.py test

This is what I see on Ubuntu 14.04 running python 2.7:

vagrant@vagrant-ubuntu-trusty-64:~/simoorg$ python setup.py test
running test
running egg_info
writing requirements to src/simoorg.egg-info/requires.txt
writing src/simoorg.egg-info/PKG-INFO
writing top-level names to src/simoorg.egg-info/top_level.txt
writing dependency_links to src/simoorg.egg-info/dependency_links.txt
writing entry points to src/simoorg.egg-info/entry_points.txt
reading manifest file 'src/simoorg.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'product-spec.json'
warning: no files found matching 'mppy-pinned.txt'
writing manifest file 'src/simoorg.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
  File "setup.py", line 59, in <module>
    'simoorg = simoorg.__main__:main'
  File "/usr/lib/python2.7/distutils/core.py", line 151, 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 "/usr/local/lib/python2.7/dist-packages/setuptools/command/test.py", line 142, in run
    self.with_project_on_sys_path(self.run_tests)
  File "/usr/local/lib/python2.7/dist-packages/setuptools/command/test.py", line 122, in with_project_on_sys_path
    func()
  File "/usr/local/lib/python2.7/dist-packages/setuptools/command/test.py", line 163, in run_tests
    testRunner=self._resolve_as_ep(self.test_runner),
  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 130, 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 "/usr/local/lib/python2.7/dist-packages/setuptools/command/test.py", line 37, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/usr/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName
    module = __import__('.'.join(parts_copy))
  File "/usr/lib/python2.7/test/regrtest.py", line 183, in <module>
    for module in sys.modules.itervalues():
RuntimeError: dictionary changed size during iteration

(Also see something similar on Mac OS X 10.10.5)

@sarathsreedharan
Copy link
Contributor

Hey Srikanth,
Try using nosetests to test the package, you will need to run the command
python2.7 setup.py nosetests
(Though looks like there are some tests that needs to be fixed , I will start working on getting those fixed and update the document to reflect the use of nosetests instead of test )

@srikanth-viswanathan
Copy link
Author

@sarathsreedharan Thanks. nosetests does actually run the tests. Not all tests pass, however. Should we keep this issue open to track that? The original reason I entered this ticket was so I could verify all tests passed before attempting to contribute a patch elsewhere in the simoorg code.

@sarathsreedharan
Copy link
Contributor

Yes, let's keep the issue open till we fix all the tests

@sarathsreedharan
Copy link
Contributor

have created #9 for this issue

@MayureshGharat
Copy link
Contributor

Hi Sarath,

I am going to merge this pull request, if that's ok.

Thanks,

Mayuresh

On Fri, Oct 16, 2015 at 2:31 PM, sarathsreedharan [email protected]
wrote:

have created #9 #9 for this
issue


Reply to this email directly or view it on GitHub
#6 (comment).

-Regards,
Mayuresh R. Gharat
(862) 250-7125

@sarathsreedharan
Copy link
Contributor

Sounds good

@anhvngo
Copy link

anhvngo commented Apr 23, 2016

i am running 👍
python setup.py test then i got this:
File "/usr/lib/python2.7/test/regrtest.py", line 183, in
for module in sys.modules.itervalues():
RuntimeError: dictionary changed size during iteration

@sarathsreedharan
Copy link
Contributor

Hey Anh,
Like I mentioned previously could you try to use 'python2.7 setup.py nosetests', instead of just 'python setup.py test' that should help you run the actual unittests, meanwhile I will open a ticket to get the change reflected in the documents also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants