emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 7fac416 29/56: Increase flake8 message coverage...


From: Rocky Bernstein
Subject: [elpa] master 7fac416 29/56: Increase flake8 message coverage...
Date: Sat, 27 May 2017 05:02:33 -0400 (EDT)

branch: master
commit 7fac416d5187ab3dd24a41b4551a47159cdfa7df
Author: rocky <address@hidden>
Commit: rocky <address@hidden>

    Increase flake8 message coverage...
    
    more test lint
---
 realgud/lang/python.el     |  2 +-
 test/test-regexp-rdebug.el |  7 ++++++-
 test/test-regexp-trepan.el | 52 +++++++++++++++++++++++++++++++---------------
 3 files changed, 42 insertions(+), 19 deletions(-)

diff --git a/realgud/lang/python.el b/realgud/lang/python.el
index 2f41136..d575d36 100644
--- a/realgud/lang/python.el
+++ b/realgud/lang/python.el
@@ -176,7 +176,7 @@ traceback) line."  )
 
 (defconst realgud-flake8-msg-loc-pat
   (make-realgud-loc-pat
-   :regexp "^\\(.*\\):\\([0-9]+\\):\\([0-9]+\\): [EW]\\([0-9]+\\) "
+   :regexp "^\\(.*\\):\\([0-9]+\\):\\([0-9]+\\): [EFWCN]\\([0-9]+\\) "
    :file-group 1
    :line-group 2
    :char-offset-group 3
diff --git a/test/test-regexp-rdebug.el b/test/test-regexp-rdebug.el
index c57dc23..16fc074 100644
--- a/test/test-regexp-rdebug.el
+++ b/test/test-regexp-rdebug.el
@@ -10,7 +10,12 @@
 (test-simple-start)
 
 (eval-when-compile
+  (defvar helper-bps)
+  (defvar helper-tb)
+  (defvar prompt-pat)
+  (defvar rails-bt)
   (defvar realgud-rdebug-pat-hash)
+  (defvar test-text)
 )
 
 (setup-regexp-vars realgud-rdebug-pat-hash)
@@ -19,7 +24,7 @@
 ;; FIXME: we get a void variable somewhere in here when running
 ;;        even though we define it in lexical-let. Dunno why.
 ;;        setq however will workaround this.
-(setq text "   from /usr/local/bin/irb:12:in `<main>'")
+(setq test-text "      from /usr/local/bin/irb:12:in `<main>'")
 (note "traceback location matching")
 (let ((text "  from /usr/local/bin/irb:12:in `<main>'"))
   (assert-t (numberp (loc-match text helper-tb)) "basic traceback location")
diff --git a/test/test-regexp-trepan.el b/test/test-regexp-trepan.el
index bff0331..edf8c39 100644
--- a/test/test-regexp-trepan.el
+++ b/test/test-regexp-trepan.el
@@ -7,6 +7,24 @@
 
 (test-simple-start)
 
+(eval-when-compile
+  (defvar bps-pat)
+  (defvar ctrl-pat)
+  (defvar dbg-bt-pat)
+  (defvar file-group)
+  (defvar frame-re)
+  (defvar lang-bt-pat)
+  (defvar line-group)
+  (defvar num-group)
+  (defvar pos)
+  (defvar prompt-pat)
+  (defvar prompt-str)
+  (defvar tb-loc-match)
+  (defvar test-dbgr)
+  (defvar test-s1)
+  (defvar test-text)
+)
+
 (set (make-local-variable 'bps-pat)
      (gethash "brkpt-set"          realgud:trepan-pat-hash))
 (set (make-local-variable 'dbg-bt-pat)
@@ -21,26 +39,26 @@
 ;; FIXME: we get a void variable somewhere in here when running
 ;;        even though we define it in lexical-let. Dunno why.
 ;;        setq however will workaround this.
-(set (make-local-variable 'text)
+(set (make-local-variable 'test-text)
  "     from /usr/local/bin/irb:12:in `<main>'")
 
 (note "traceback location matching")
 
-(setq text "   from /usr/local/bin/irb:12:in `<main>'")
+(setq test-text "      from /usr/local/bin/irb:12:in `<main>'")
 
-(assert-t (numberp (loc-match text lang-bt-pat))
+(assert-t (numberp (loc-match test-text lang-bt-pat))
          "basic traceback location")
 (assert-equal "/usr/local/bin/irb"
-             (match-string (realgud-loc-pat-file-group lang-bt-pat) text)
+             (match-string (realgud-loc-pat-file-group lang-bt-pat) test-text)
              "extract traceback file name")
 
 (assert-equal "12"
              (match-string (realgud-loc-pat-line-group
-                            lang-bt-pat) text)
+                            lang-bt-pat) test-text)
              "extract traceback line number")
 
 (note "debugger-backtrace")
-(set (make-local-variable 's1)
+(set (make-local-variable 'test-s1)
      "--> #0 METHOD Object#require(path) in file <internal:lib/require> at 
line 28
     #1 TOP Object#<top /tmp/linecache.rb> in file /tmp/linecache.rb
 ")
@@ -54,26 +72,26 @@
 (set (make-local-variable 'line-group)
      (realgud-loc-pat-line-group dbg-bt-pat))
 
-(assert-equal 0 (string-match frame-re s1))
-(assert-equal "0" (substring s1
+(assert-equal 0 (string-match frame-re test-s1))
+(assert-equal "0" (substring test-s1
                             (match-beginning num-group)
                             (match-end num-group)))
 (assert-equal "<internal:lib/require>"
-             (substring s1
+             (substring test-s1
                         (match-beginning file-group)
                         (match-end file-group)))
 (assert-equal "28"
-             (substring s1
+             (substring test-s1
                         (match-beginning line-group)
                         (match-end line-group)))
 (setq pos (match-end 0))
 
-(assert-equal 77 (string-match frame-re s1 pos))
-(assert-equal "1" (substring s1
+(assert-equal 77 (string-match frame-re test-s1 pos))
+(assert-equal "1" (substring test-s1
                             (match-beginning num-group)
                             (match-end num-group)))
 (assert-equal "/tmp/linecache.rb"
-             (substring s1
+             (substring test-s1
                         (match-beginning file-group)
                         (match-end file-group)))
 
@@ -102,23 +120,23 @@
                 ctrl-pat)
              )
 
-(setq text "Breakpoint 1 set at VM offset 2 of instruction sequence \"<top 
/usr/local/bin/irb>\",
+(setq test-text "Breakpoint 1 set at VM offset 2 of instruction sequence 
\"<top /usr/local/bin/irb>\",
        line 9 in file /usr/local/bin/irb.
 ")
 
 
-(assert-t (numberp (loc-match text bps-pat))
+(assert-t (numberp (loc-match test-text bps-pat))
          "basic breakpoint location")
 
 
 (assert-equal "/usr/local/bin/irb"
              (match-string (realgud-loc-pat-file-group
-                            bps-pat) text)
+                            bps-pat) test-text)
              "extract breakpoint file name")
 
 (assert-equal "9"
              (match-string (realgud-loc-pat-line-group
-                            bps-pat) text)
+                            bps-pat) test-text)
              "extract breakpoint line number")
 
 (end-tests)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]