<commit_before>(ns midje.emission.t-clojure-test-facade
  (:require [midje.sweet :refer :all]
            [midje.emission.clojure-test-facade :refer :all]
            [midje.test-util :refer :all]
            clojure.test))

;;; run-tests

(let [result (run-tests ['midje.emission.t-clojure-test-facade])]
  (fact
    :check-only-at-load-time
    (:test result) => 0
    (:fail result) => 0
    (:lines result) => ["",
                        "Ran 0 tests containing 0 assertions."
                        "0 failures, 0 errors."]))

(clojure.test/deftest a-clojure-test-pass
  (clojure.test/is (= 1 1)))

(let [result (run-tests ['midje.emission.t-clojure-test-facade])]
  (fact
    (:test result) => 1
    (:fail result) => 0
    (:lines result) => ["",
                        "Ran 1 tests containing 1 assertions."
                        "0 failures, 0 errors."]))

(clojure.test/deftest a-clojure-test-fail
  (clojure.test/is (= 1 2)))

(let [result (run-tests ['midje.emission.t-clojure-test-facade])]
  (fact
    (:test result) => 2
    (:fail result) => 1
    (nth (:lines result) 1) => #"FAIL.*in.*a-clojure-test-fail"
    (nth (:lines result) 3) => #"expected"
    (nth (:lines result) 4) => #"actual"
    (take-last 2 (:lines result)) => ["Ran 2 tests containing 2 assertions."
                                      "1 failures, 0 errors."]))

(ns-unmap *ns* 'a-clojure-test-fail) ; so as not to see failure when test rerun.<commit_msg>Unregister clojure.test result after test<commit_after>(ns midje.emission.t-clojure-test-facade
  (:require [midje.sweet :refer :all]
            [midje.emission.clojure-test-facade :refer :all]
            [midje.test-util :refer :all]
            clojure.test))

;;; run-tests

(let [result (run-tests ['midje.emission.t-clojure-test-facade])]
  (fact
    :check-only-at-load-time
    (:test result) => 0
    (:fail result) => 0
    (:lines result) => ["",
                        "Ran 0 tests containing 0 assertions."
                        "0 failures, 0 errors."]))

(clojure.test/deftest a-clojure-test-pass
  (clojure.test/is (= 1 1)))

(let [result (run-tests ['midje.emission.t-clojure-test-facade])]
  (fact
    (:test result) => 1
    (:fail result) => 0
    (:lines result) => ["",
                        "Ran 1 tests containing 1 assertions."
                        "0 failures, 0 errors."]))

(clojure.test/deftest a-clojure-test-fail
  (clojure.test/is (= 1 2)))

(let [result (run-tests ['midje.emission.t-clojure-test-facade])]
  (fact
    (:test result) => 2
    (:fail result) => 1
    (nth (:lines result) 1) => #"FAIL.*in.*a-clojure-test-fail"
    (nth (:lines result) 3) => #"expected"
    (nth (:lines result) 4) => #"actual"
    (take-last 2 (:lines result)) => ["Ran 2 tests containing 2 assertions."
                                      "1 failures, 0 errors."]))

(ns-unmap *ns* 'a-clojure-test-fail) ; so as not to see failure when test rerun.
(ns-unmap *ns* 'a-clojure-test-pass) ; so as not to see success when test rerun.
{'fraction_non_alphanumeric': 0.17038269550748752, 'fraction_numerical': 0.017304492512479203, 'mean_word_length': 2.267391304347826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3425292', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1038, 'n_words': 261}