Skip to content

Instantly share code, notes, and snippets.

@sigma
Created February 26, 2013 11:19
Show Gist options
  • Select an option

  • Save sigma/5037781 to your computer and use it in GitHub Desktop.

Select an option

Save sigma/5037781 to your computer and use it in GitHub Desktop.
template for tox-based testing for emacs
from distutils.core import setup
setup(name="magit",
version='0',
)
[tox]
envlist =
emacs23,emacs24,emacs-snapshot
[testenv]
deps =
virtualenv-emacs
[testenv:emacs23]
commands =
virtualenv_install_emacs --with-emacs="{env:EMACS23}" --with-env={envdir} --marmalade
elpa-get mocker cl-lib
make test
[testenv:emacs24]
commands =
virtualenv_install_emacs --with-emacs="{env:EMACS24}" --with-env={envdir} --marmalade
elpa-get mocker cl-lib
make test
[testenv:emacs-snapshot]
commands =
virtualenv_install_emacs --with-emacs="{env:EMACSSNAPSHOT}" --with-env={envdir} --marmalade
elpa-get mocker cl-lib
make test
@tkf

tkf commented Feb 26, 2013

Copy link
Copy Markdown

Great! How about something like this?

[tox]
envlist =
  emacs23,emacs24,emacs-snapshot

[testenv]
deps =
  virtualenv-emacs
commands =
  virtualenv_install_emacs --with-emacs="{env:BASEEMACS}" --with-env={envdir} --marmalade
  elpa-get mocker cl-lib
  emacs [] -Q -l tests/run-test.el

[testenv:emacs23]
setenv =
  BASEEMACS=emacs23

[testenv:emacs24]
setenv =
  BASEEMACS=emacs24

[testenv:emacs-snapshot]
setenv =
  BASEEMACS=emacs-snapshot

@tkf

tkf commented Feb 26, 2013

Copy link
Copy Markdown

I just noticed that the problem is byte-compilation. It would be nice if there is a script to install the project (e.g., magit) under virtualenv. This way you don't suffer from incompatible byte compiled files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment