old_contents: import os
  import subprocess
  
  import pytest
  
  
  def test_list_subcommands_has_all_scripts():
    """Tests if the output from running `fontbakery --list-subcommands` matches
      the fontbakery scripts within the bin folder."""
    import fontbakery.commands
    commands_dir = os.path.dirname(fontbakery.commands.__file__)
  
    scripts = [
        f.rstrip(".py").replace("_", "-")
        for f in os.listdir(commands_dir)
        if (f.endswith(".py") and not f.startswith('_'))
    ]
    subcommands = subprocess.check_output(
        ['fontbakery', '--list-subcommands']).decode().split()
    assert sorted(scripts) == sorted(subcommands)
  
  
  def test_command_check_googlefonts():
    """Test if `fontbakery check-googlefonts` can run successfully`."""
    subprocess.check_output(["fontbakery", "check-googlefonts", "-h"])
  
    with pytest.raises(subprocess.CalledProcessError):
      subprocess.check_output(["fontbakery", "check-googlefonts"])
  
  
  def test_command_check_specification():
    """Test if `fontbakery check-specification` can run successfully`."""
    subprocess.check_output(["fontbakery", "check-specification", "-h"])
  
    with pytest.raises(subprocess.CalledProcessError):
      subprocess.check_output(["fontbakery", "check-specification"])
  
  
  def test_command_check_ufo_sources():
    """Test if `fontbakery check-ufo-sources` can run successfully`."""
    subprocess.check_output(["fontbakery", "check-ufo-sources", "-h"])
  
    with pytest.raises(subprocess.CalledProcessError):
      subprocess.check_output(["fontbakery", "check-ufo-sources"])
  
new_contents: import os
  import subprocess
  
  import pytest
  
  
  def test_list_subcommands_has_all_scripts():
    """Tests if the output from running `fontbakery --list-subcommands` matches
      the fontbakery scripts within the bin folder."""
    import fontbakery.commands
    commands_dir = os.path.dirname(fontbakery.commands.__file__)
  
    scripts = [
        f.rstrip(".py").replace("_", "-")
        for f in os.listdir(commands_dir)
        if (f.endswith(".py") and not f.startswith('_'))
    ]
    subcommands = subprocess.check_output(
        ['fontbakery', '--list-subcommands']).decode().split()
    assert sorted(scripts) == sorted(subcommands)
  
  
  def test_command_check_googlefonts():
    """Test if `fontbakery check-googlefonts` can run successfully`."""
    subprocess.check_output(["fontbakery", "check-googlefonts", "-h"])
  
    test_font = os.path.join("data", "test", "nunito", "Nunito-Regular.ttf")
  
    subprocess.check_output([
        "fontbakery", "check-googlefonts", "-n", "-c",
        "com.google.fonts/check/001", test_font
    ])
  
    with pytest.raises(subprocess.CalledProcessError):
      subprocess.check_output(["fontbakery", "check-googlefonts"])
  
  
  def test_command_check_specification():
    """Test if `fontbakery check-specification` can run successfully`."""
    subprocess.check_output(["fontbakery", "check-specification", "-h"])
  
    with pytest.raises(subprocess.CalledProcessError):
      subprocess.check_output(["fontbakery", "check-specification"])
  
  
  def test_command_check_ufo_sources():
    """Test if `fontbakery check-ufo-sources` can run successfully`."""
    subprocess.check_output(["fontbakery", "check-ufo-sources", "-h"])
  
    with pytest.raises(subprocess.CalledProcessError):
      subprocess.check_output(["fontbakery", "check-ufo-sources"])
  
subject: Add usage test to run one test from the googlefonts specification