                              query
                              :already-installed {"a" 30})
                            [:successful]))))
-  (deftest conflicts
-           (testing (str "Find a package which conflicts with another "
-                         "package also to be installed.")
-                    (is (= (resolve-dependencies
-                             [{:name "d"}
-                              {:name "e"}]
-                             query)
-                           [:unsatisfiable "e"])))
-           (testing (str "Find a package which conflicts with a package "
-                         "marked a priori as conflicting.")
-                    (is (= (resolve-dependencies
-                             [{:name "a"}
-                              {:name "d"}]
-                             query
-                             :conflicts {"d" nil})
-                           [:unsatisfiable "d"])))
-           (testing (str "Find a package which conflicts with a package "
-                         "marked a priori as conflicting with something "
-                         "already installed.")
-                    (is (= (resolve-dependencies
-                             [{:name "d"}]
-                             query
-                             :already-installed {"a" 11}
-                             :conflicts {"d" nil})
-                           [:unsatisfiable "d"])))
-
-           (testing (str "Find a package which conflicts with another "
-                         "package but not at its current version")
-                    (is (= (resolve-dependencies
-                             [{:name "d"}]
-                             query
-                             :conflicts {"d" #(< % 22)})
-                           [:successful package-d22])))))
+(deftest conflicts
+         (testing (str "Find a package which conflicts with another "
+                       "package also to be installed.")
+                  (is (= (resolve-dependencies
+                           [{:name "d"}
+                            {:name "e"}]
+                           query)
+                         [:unsatisfiable "e"])))
+         (testing (str "Find a package which conflicts with a package "
+                       "marked a priori as conflicting.")
+                  (is (= (resolve-dependencies
+                           [{:name "a"}
+                            {:name "d"}]
+                           query
+                           :conflicts {"d" nil})
+                         [:unsatisfiable "d"])))
+         (testing (str "Find a package which conflicts with a package "
+                       "marked a priori as conflicting with something "
+                       "already installed.")
+                  (is (= (resolve-dependencies
+                           [{:name "d"}]
+                           query
+                           :already-installed {"a" 11}
+                           :conflicts {"d" nil})
+                         [:unsatisfiable "d"])))
+
+         (testing (str "Find a package which conflicts with another "
+                       "package but not at its current version")
+                  (is (= (resolve-dependencies
+                           [{:name "d"}]
+                           query
+                           :conflicts {"d" #(< % 22)})
+                         [:successful package-d22])))))
 
 (deftest requires
          (let [package-a

                              {:name "b"}]
                             query)
                           [:unsatisfiable "b" "c"]))))
           (let [package-a
                 {:name "a"
                  :version 10
                  :location "a_loc10"}
                 package-b
                 {:name "b"
                  :version 10
                  :location "b_loc10"
                  :requires [{:name "c"}]}
                 package-c
                 {:name "c"
                  :version 10
                  :local "c_loc10"}
                 repo-info
                 {"a" [package-a]
                  "b" [package-b]
                  "c" [package-c]}
                 query (map-query repo-info)]
           (testing (str "A package having dependencies rejected a priori "
                         "also gets rejected")
                    (is (= (resolve-dependencies

                             :conflicts {"c" nil})
                           [:unsatisfiable "b" "c"])))))

(deftest no-locking
         (testing (str "Find two packages, even when the preferred version "
                       "of one package conflicts with the other")
                  (let [package-a30
                        {:name "a"
                         :version 30
                         :location "a_loc30"
                         :conflicts {"c" nil}
                         }
                        package-a20
                        {:name "a"
                         :version 20
                         :location "a_loc20"}
                        package-c10
                        {:name "c"
                         :version 10
                         :location "c_loc10"}
                        repo-info
                        {"a" [package-a30 package-a20]
                         "c" [package-c10]}
                        query (map-query repo-info)]
                    (is (= (resolve-dependencies
                             [{:name "a"}
                              {:name "c"}]
                             query)
                           [:successful package-a20 package-c10]))))

         (testing (str "Diamond problem")
                  (let [package-a
                        {:name "a"
                         :version 1
                         :location "a_loc1"
                         :requires [{:name "b"}
                                    {:name "c"}]}
                        package-b
                        {:name "b"
                         :version 1
                         :location "b_loc1"
                         :requires [{:name "d"
                                     :version-spec #(>= % 2)}]}
                        package-c
                        {:name "c"
                         :version 1
                         :location "c_loc1"
                         :requires [{:name "d"
                                     :version-spec #(< % 4)}]}
                        package-d3
                        {:name "d"
                         :version 3
                         :location "d_loc3"}
                        package-d4
                        {:name "d"
                         :version 4
                         :location "d_loc4"}
                        repo-info
                        {"a" [package-a]
                         "b" [package-b]
                         "c" [package-c]
                         "d" [package-d4 package-d3]}
                        query
                        (map-query repo-info)]
                    (is (= (resolve-dependencies
                             [{:name "a"}]
                             query)
                           [:successful
                            package-a
                            package-b
                            package-c
                            package-d3]))))
         (let [package-a
               {:name "a"
                :version 1
                :location "a_loc1"
                :requires [{:name "b"}
                           {:name "c"}]}
               package-b
               {:name "b"
                :version 1
                :location "b_loc1"
                :requires [{:name "d"
                            :version-spec #(>= % 2)}
                           {:name "e"
                            :version-spec #(= % 5)}]}
               package-c
               {:name "c"
                :version 1
                :location "c_loc1"
                :requires [{:name "e"
                            :version-spec #(>= % 1)}
                           {:name "d"
                            :version-spec #(< % 4)}]}
               package-d3
               {:name "d"
                :version 3
                :location "d_loc3"}
               package-d4
               {:name "d"
                :version 4
                :location "d_loc4"}
               package-e6
               {:name "e"
                :version 6
                :location "e_loc6"}
               package-e5
               {:name "e"
                :version 6
                :location "e_loc5"}
               repo-info
               {"a" [package-a]
                "b" [package-b]
                "c" [package-c]
                "d" [package-d4 package-d3]
                "e" [package-e6 package-e5]}
               query
               (map-query repo-info)]
           (testing (str "Inter-Locking Diamond problem")
                    (is (= (resolve-dependencies
                             [{:name "a"}]
                             query)
                           [:successful
                            package-a
                            package-b
                            package-c
                            package-d3
                            package-e5])))))
