Skip to content

Commit

Permalink
Merge pull request cgag#10 from iantruslove/master
Browse files Browse the repository at this point in the history
Stop unnnecessary testing
  • Loading branch information
cgag committed Oct 14, 2015
2 parents 5a3f84d + ffa2657 commit 3f9a537
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/boilerpipe_clj/extractors.clj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(ns boilerpipe-clj.extractors
(:import (de.l3s.boilerpipe.extractors
(ns boilerpipe-clj.extractors
(:import (de.l3s.boilerpipe.extractors
ArticleExtractor
ArticleSentencesExtractor
DefaultExtractor)))
Expand Down
9 changes: 4 additions & 5 deletions test/boilerpipe_clj/core_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,23 @@
[boilerpipe-clj.core :refer :all]
[boilerpipe-clj.extractors :as ext]))

(defonce test-article
(defonce test-article
(slurp "./test/boilerpipe_clj/resources/greenspun-test.html"))

(def extractors [ext/default-extractor
ext/article-extractor
ext/article-sentence-extractor])

;; TODO: Why does lein test say it tests 6400 assertions?
(deftest get-text-extraction
(testing "get-text extracts something from an article
without a provided extractor"
(let [res (get-text test-article)]
(is (and
(let [res (get-text test-article)]
(is (and
(not= res "")
(not= res nil)))))
(testing "All the available extractors extract something
from the article"
(doseq [ext extractors
res (get-text test-article ext)]
:let [res (get-text test-article ext)]]
(is (and (not= res "")
(not (nil? res)))))))

0 comments on commit 3f9a537

Please sign in to comment.