<commit_before>package org.openqa.selenium.firefox.internal;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.testing.NeedsLocalEnvironment;
import org.openqa.selenium.testing.SeleniumTestRunner;

import java.io.File;

public class ExecutableTest {

  @Test
  @NeedsLocalEnvironment(reason = "Requires local browser launching environment")
  public void testEnvironmentDiscovery() {
    Executable env = new Executable(null);
    File exe = env.getFile();
    assertNotNull(exe);
    assertFalse(exe.isDirectory());
  }
}
<commit_msg>SimonStewart: The executable test relies on the system running the test having firefox installed. Checking this assumption before running the test as this is not true on the CI server.<commit_after>package org.openqa.selenium.firefox.internal;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.Platform;
import org.openqa.selenium.os.CommandLine;
import org.openqa.selenium.testing.NeedsLocalEnvironment;
import org.openqa.selenium.testing.SeleniumTestRunner;

import java.io.File;

public class ExecutableTest {

  private String executableName = Platform.getCurrent().is(Platform.MAC) ?
      "/Applications/Firefox.app/Contents/Resources/firefox" : "firefox";

  @Test
  public void testEnvironmentDiscovery() {
    if (CommandLine.findExecutable(executableName) == null) {
      System.out.println("Skipping test: no firefox present");
      return;
    }

    Executable env = new Executable(null);
    File exe = env.getFile();
    assertNotNull(exe);
    assertFalse(exe.isDirectory());
  }
}

{'fraction_non_alphanumeric': 0.10028011204481793, 'fraction_numerical': 0.0, 'mean_word_length': 4.894389438943894, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3317954', 'n_tokens_mistral': 545, 'n_tokens_neox': 521, 'n_words': 122}