Dan Lipsitt  committed 403e586

Make customizable with defcustom.

  • Participants
  • Parent commits d413c24
  • Branches default

Comments (0)

Files changed (1)

 ;; In your emacs config:
 ;; (require 'nose)
-;; ; next line only for people with non-eco non-global test runners
-;; ; (add-to-list 'nose-project-names "my/crazy/runner")
-;; Note that if your global nose isn't called "nosetests", then you'll want to
-;; redefine nose-global-name to be the command that should be used.
-;; By default, the root of a project is found by looking for any of the files
-;; '', '.hg' and '.git'. You can add files to check for to the file
-;; list:
-;; ; (add-to-list 'nose-project-root-files "something")
-;; or you can change the project root test to detect in some other way
-;; whether a directory is the project root:
-;; ; (setq nose-project-root-test (lambda (dirname) (equal dirname "foo")))
-;; If you want dots as output, rather than the verbose output:
-;; (defvar nose-use-verbose nil) ; default is t
+;; Run `customize-group nose' to configure.
 ;; Probably also want some keybindings:
 ;; (add-hook 'python-mode-hook
 (require 'cl) ;; for "reduce"
-(defvar nose-project-names '("eco/bin/test"))
-(defvar nose-project-root-files '("" ".hg" ".git"))
-(defvar nose-project-root-test 'nose-project-root)
-(defvar nose-global-name "nosetests")
-(defvar nose-use-verbose t)
+(defgroup nose nil
+  "A tool for Python unit testing."
+  :group 'python)
+(defcustom nose-project-names nil
+  "Location of non-global test runners."
+  :type '(repeat directory)
+  :group 'nose)
+(defcustom nose-project-root-files '("" ".hg" ".git")
+  "The presence of one of these files indicates the project root directory.
+You may choose to use a custom function instead by setting
+  :type '(repeat string)
+  :group 'nose)
+(defcustom nose-project-root-test 'nose-project-root
+  "This function is used to detect the project root.
+It can be a lambda expression. For example:
+  '(lambda (dirname) (equal dirname \"foo\"))"
+  :type '(function)
+  :group 'nose)
+(defcustom nose-global-name "nosetests"
+  "Name of the nose shell command."
+  :type '(string)
+  :group 'nose)
+(defcustom nose-use-verbose t
+  "Only dots will be output if this variable is nil."
+  :type '(boolean)
+  :group 'nose)
 (defun run-nose (&optional tests debug failed)
   "run nosetests"