Called when a file is changed to re-run the tests with nose.
960740
def run(self):
        """"""
        if self.auto_clear:
            os.system('cls' if os.name == 'nt' else 'auto_clear')
        else:
            print
        print 'Running unit tests...'
        if self.auto_clear:
            print
        subprocess.call('nosetests', cwd=self.directory)
300365
def refresh(self, index=None):
        """"""
        if index is None:
            index = self.get_stack_index()
        # Set current editor
        if self.get_stack_count():
            index = self.get_stack_index()
            finfo = self.data[index]
            editor = finfo.editor
            editor.setFocus()
            self._refresh_outlineexplorer(index, update=False)
            self.__refresh_statusbar(index)
            self.__refresh_readonly(index)
            self.__check_file_status(index)
            self.__modify_stack_title()
            self.update_plugin_title.emit()
        else:
            editor = None
        # Update the modification-state-dependent parameters
        self.modification_changed()
        # Update FindReplace binding
        self.find_widget.set_editor(editor, refresh=False)
501216
def reload!
      clear

      @mixins.each do |file|
        mixin(file)
      end

      @callbacks.each do |callback|
        callback.call(self)
      end
    end
1330178
def if_file_changed(file, &block)
      if_string_changed(file, Digest::SHA256.file(file).hexdigest.to_s, &block)
    end
525305
private function updateRootDirOnTargetFile(): void
    {
        $realTemplateTestsPath = realpath(self::ROOT_TEMPLATE_PATH . self::TEST_DIR);
        if (0 === \strpos($this->templateFile->getPath(), $realTemplateTestsPath)) {
            $updatedPath = str_replace(
                '/src/',
                '/tests/',
                $this->targetFile->getPath()
            );
            $this->targetFile->setPath($updatedPath);
        }
    }
1308900
function fileChanged(status, filepath) {
			// If file was deleted and then re-added, consider it changed.
			if (changedFiles[filepath] === 'deleted' && status === 'added') {
				status = 'changed';
			}
			// Keep track of changed status for later.
			changedFiles[filepath] = status;
			// Emit watch events if anyone is listening
			if (grunt.event.listeners('watch').length > 0) {
				var matchingTargets = [];
				targets.forEach(function(target) {
					if (grunt.file.match(target.files, filepath).length > 0) {
						matchingTargets.push(target.name);
					}
				});
				matchingTargets.forEach(function(matchingTarget) {
					grunt.event.emit('watch', status, filepath, matchingTarget);
				});
			}
			// Keep track of changed status for later.
			changedFiles[filepath] = status;
			// Execute debounced done function.
			done();
		}
281100
def service_changed(self, event):
        
        kind = event.get_kind()
        reference = event.get_service_reference()

        if kind in (pelix.ServiceEvent.REGISTERED, pelix.ServiceEvent.MODIFIED):
            # A service matches our filter
            self.set_shell(reference)

        else:
            with self._lock:
                # Service is not matching our filter anymore
                self.clear_shell()

                # Request for a new binding
                self.search_shell()
583888
def run_on_change(paths)
      if @options[:dry_run]
        paths.each { |path| UI.info "Dry run: #{path}" }
        return
      end

      total    = 0
      failures = 0
      duration = 0
      run_command("mix test #{paths.join(' ')}") do |line|
        puts line
        if /Finished in ([0-9.]+) seconds/.match(line)
          duration = Regexp::last_match[1]
        elsif /([0-9]+) tests, ([0-9]+) failures/.match(line)
          total = Regexp::last_match[1].to_i
          failures = Regexp::last_match[2].to_i
        end
      end

      Notifier.notify(
        guard_message(total, failures, duration),
        :title => "Elixir results",
        :image => guard_image(failures),
        :priority => guard_priority(failures)
      )
    end
183823
def run_on_changes(paths)
			cmd = "#{options[:executable]} --config #{@options[:config]} #{paths.map { |p| p.shellescape }.join(' ')}"
			results = `#{cmd}`

			success = ($?.to_i == 0)

			if success
				if options[:notify_on_success]
					::Guard::Notifier.notify('No errors found.', :title => 'JSHint', :image => :success)
				end
			else
				if options[:notify_on_failure]
					::Guard::Notifier.notify(results, :title => 'JSHint Errors', :image => :failed)
				end
				print results
			end
			return success
		end
804772
private void detectFileChange() throws IOException {
		checkClosed();
		assert Thread.holdsLock(filePosLock);
		while(!file.exists()) {
			try {
				System.err.println("File not found, waiting: " + file.getPath());
				Thread.sleep(pollInterval);
			} catch(InterruptedException e) {
				InterruptedIOException newExc = new InterruptedIOException(e.getMessage());
				newExc.initCause(e);
				throw newExc;
			}
			checkClosed();
		}
		long fileLen = file.length();
		if(fileLen<filePos) filePos = 0;
	}
822889
def run_and_collect_multiple_changes(monitor, times, directory, *flags, &block)
      watch_and_run(monitor, times, false, directory, *flags, &block)
    end
751693
def script_file_changed(path)
      Ichiban.logger.script_run(path)
      script = Ichiban::Script.new(path).run
    end
812509
function onFileChanged(event) {
		if(event && event.type === 'Changed' && Array.isArray(event.modified)) {
			//event = {type, files: [{name, location, metadata: {contentType}}]}
			event.modified.forEach(function(file) {
				if(typeof file === 'string') {
					_cache.remove(_getKey(file));
				}
			});
		}
	}
1215537
public static function updateChangeTime() {

		if (is_dir(Config::getOption("publicDir"))) {
			file_put_contents(Config::getOption("publicDir")."/latest-change.txt",time());
		} else {
			Console::writeError("the public directory for Pattern Lab doesn't exist...");
		}

	}
900236
def _check_for_unit_changes(name):
    '''
    
    '''
    contextkey = 'systemd._check_for_unit_changes.{0}'.format(name)
    if contextkey not in __context__:
        if _untracked_custom_unit_found(name) or _unit_file_changed(name):
            systemctl_reload()
        # Set context key to avoid repeating this check
        __context__[contextkey] = True
561560
def refresh( self ):
        
        self.clear()
        
        for i, filename in enumerate(self.filenames()):
            name   = '%i. %s' % (i+1, os.path.basename(filename))
            action = self.addAction(name)
            action.setData(wrapVariant(filename))
470768
def reload_file(self, is_modified=True):
        

        if not foundations.common.path_exists(self.__file):
            raise foundations.exceptions.FileExistsError("{0} | '{1}' file doesn't exists!".format(
                self.__class__.__name__, self.__file))

        LOGGER.debug("> Reloading '{0}' file.".format(self.__file))
        reader = foundations.io.File(self.__file)
        if reader.cache():
            self.set_content(reader.content)
            self.set_file(self.__file, is_modified=is_modified)

            self.file_reloaded.emit()
            return True