Exemple #1
0
    def should_prefer_command_over_abs(self, vh):
        valid_trigger["relative"] = False
        Query.force("filepath_type", "relative")

        Query.build("/absolute", valid_trigger, "current_folder", "")

        self.assert_equal(Query.base_path, "current_folder")
	def should_prefer_command_over_abs(self, vh):
		valid_trigger["relative"] = False
		Query.force("filepath_type", "relative")

		Query.build("/absolute", valid_trigger, "current_folder", "")

		self.assert_equal(Query.base_path, "current_folder")
Exemple #3
0
    def should_set_base_directory_for_relative_queries(self, vh):
        valid_trigger["relative"] = True
        valid_trigger["base_directory"] = "base_directory"

        Query.build("", valid_trigger, "current_folder", "")

        self.assert_equal(Query.base_path, "base_directory")
	def should_set_base_directory_for_relative_queries(self, vh):
		valid_trigger["relative"] = True
		valid_trigger["base_directory"] = "base_directory"

		Query.build("", valid_trigger, "current_folder", "")

		self.assert_equal(Query.base_path, "base_directory")
	def should_set_basepath_to_current_folder(self, vh):
		Query.reset()
		query = Query.build("", {
			"relative": True,
			"auto": True
		}, "current_folder", "")

		self.assert_equal(query["base_path"], "current_folder")
	def before_each(self, vh):
		global valid_trigger

		Query.reset()
		valid_trigger = {

			"auto": True
		}
	def should_not_set_basepath_for_absolute_queries(self, vh):
		Query.reset()
		query = Query.build("", {
			"relative": False,
			"auto": True
		}, "current_folder", "")

		self.assert_equal(query["base_path"], False)
	def should_abort_on_empty_values(self, vh):
		needle = ""
		current_folder = ""
		project_folder = ""
		trigger = {}

		valid = Query.build(needle, trigger, current_folder, project_folder)

		self.assert_equal(valid, False)
Exemple #9
0
    def should_abort_on_empty_values(self, vh):
        needle = ""
        current_folder = ""
        project_folder = ""
        trigger = {}

        valid = Query.build(needle, trigger, current_folder, project_folder)

        self.assert_equal(valid, False)
	def should_prefer_needletype_over_relative_setting_02(self, vh):
		valid_trigger["relative"] = False

		Query.build("../relative", valid_trigger, "current_folder", "")

		self.assert_equal(Query.base_path, "current_folder")
	def should_not_set_basepath_for_absolute_queries(self, vh):
		valid_trigger["relative"] = False

		Query.build("", valid_trigger, "current_folder", "")

		self.assert_equal(Query.base_path, False)
	def should_set_basepath_to_current_folder(self, vh):
		valid_trigger["relative"] = True

		Query.build("", valid_trigger, "current_folder", "")

		self.assert_equal(Query.base_path, "current_folder")
	def should_be_valid_for_auto(self, vh):
		valid = bool(Query.build("", valid_trigger, "", ""))

		self.assert_equal(valid, True)
Exemple #14
0
    def should_prefer_needletype_over_relative_setting_02(self, vh):
        valid_trigger["relative"] = False

        Query.build("../relative", valid_trigger, "current_folder", "")

        self.assert_equal(Query.base_path, "current_folder")
Exemple #15
0
    def should_not_set_basepath_for_absolute_queries(self, vh):
        valid_trigger["relative"] = False

        Query.build("", valid_trigger, "current_folder", "")

        self.assert_equal(Query.base_path, False)
Exemple #16
0
    def should_set_basepath_to_current_folder(self, vh):
        valid_trigger["relative"] = True

        Query.build("", valid_trigger, "current_folder", "")

        self.assert_equal(Query.base_path, "current_folder")
Exemple #17
0
    def should_be_valid_for_auto(self, vh):
        valid = bool(Query.build("", valid_trigger, "", ""))

        self.assert_equal(valid, True)
Exemple #18
0
    def before_each(self, vh):
        global valid_trigger

        Query.reset()
        valid_trigger = {"auto": True}