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

Configurable nosetests support #8

Closed
svetlyak40wt opened this issue Mar 20, 2015 · 8 comments
Closed

Configurable nosetests support #8

svetlyak40wt opened this issue Mar 20, 2015 · 8 comments

Comments

@svetlyak40wt
Copy link
Contributor

I want to contribute a nosetests support. What is the best way to make choice between py.test and nose configurable?

@ionelmc
Copy link
Owner

ionelmc commented Mar 20, 2015

I would involve:

Then just push branch and make PR (Travis will run the tests) and we'll figure out what to do from there.

@ionelmc
Copy link
Owner

ionelmc commented Mar 20, 2015

If you get stuck, just make the PR with whatever you have so far.

@svetlyak40wt
Copy link
Contributor Author

Thank, you. Will send a pull request.

@svetlyak40wt
Copy link
Contributor Author

@ionelmc here is a pull: #9
What is the best way to test if it works correctly?

@ionelmc
Copy link
Owner

ionelmc commented Mar 23, 2015

If you wanna test locally you can run cookiecutter path/to/your/fork.

You can also run the whole suite (just run tox), but be warned, it will override your ~/.cookiecutterrc - I will fix that soon-ish.

@svetlyak40wt
Copy link
Contributor Author

@ionelmc could you please help me with tox?

I tried to run it locally, but have got this strange error:

test create: /Users/art/projects/cookiecutter-pylibrary/.tox/test
test installdeps: cookiecutter==1.0.0, bumpversion==0.5.1, tox==1.9.0
test runtests: PYTHONHASHSEED='2864253310'
test runtests: commands[0] | /Users/art/projects/cookiecutter-pylibrary/ci/test.cmd matrix-nosetests
ERROR: invocation failed (errno 13), args: ['/Users/art/projects/cookiecutter-pylibrary/ci/test.cmd', 'matrix-nosetests'], cwd: /Users/art/projects/cookiecutter-pylibrary
Traceback (most recent call last):
  File "/Users/art/.local/bin/tox", line 9, in <module>
    load_entry_point('tox==1.8.1', 'console_scripts', 'tox')()
  File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_cmdline.py", line 26, in main
    retcode = Session(config).runcommand()
  File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_cmdline.py", line 310, in runcommand
    return self.subcommand_test()
  File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_cmdline.py", line 455, in subcommand_test
    self.runtestenv(venv)
  File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_cmdline.py", line 463, in runtestenv
    venv.test(redirect=redirect)
  File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_venv.py", line 347, in test
    self._pcall(argv, cwd=cwd, action=action, redirect=redirect)
  File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_venv.py", line 370, in _pcall
    return action.popen(args, cwd=cwd, env=env, redirect=redirect)
  File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_cmdline.py", line 97, in popen
    stdout=f, stderr=STDOUT)
  File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_cmdline.py", line 159, in _popen
    stdout=stdout, stderr=stderr, env=env)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

As I understand, cookiecutter-pylibrary/ci/test.cmd is a script for windows environment, right? Why it is executed on OSX?

@ionelmc
Copy link
Owner

ionelmc commented Mar 25, 2015

My bad, I accidentally unset the exec perms on that file. Run chmod +x ci/test.cmd to fix.

test.cmd is just a shim (can run as both windows batch or unix shell).

@ionelmc
Copy link
Owner

ionelmc commented Mar 25, 2015

Seems I also have the wrong slash inside (should be ci/test.sh instead of ci\test.sh).

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

2 participants