import pytest
import foyer


def test_basic_import():
    assert 'forcefields' in dir(foyer)


@pytest.mark.parametrize('ff_name', ['OPLSAA', 'TRAPPE_UA'])
def test_forcefields_exist(ff_name):
    ff_name in dir(foyer.forcefields)


def test_load_forcefield():
    OPLSAA = foyer.forcefields.get_forcefield(name='oplsaa')
    TRAPPE_UA = foyer.forcefields.get_forcefield(name='trappe-ua')
    with pytest.raises(ValueError):
        foyer.forcefields.get_forcefield('bogus_name')

import pytest
import foyer


def test_basic_import():
    assert 'forcefields' in dir(foyer)


@pytest.mark.parametrize('ff_loader', ['load_OPLSAA', 'load_TRAPPE_UA'])
def test_forcefields_exist(ff_loader):
    assert ff_loader in dir(foyer.forcefields)


def test_load_forcefield():
    OPLSAA = foyer.forcefields.get_forcefield(name='oplsaa')
    TRAPPE_UA = foyer.forcefields.get_forcefield(name='trappe-ua')
    with pytest.raises(ValueError):
        foyer.forcefields.get_forcefield('bogus_name')

Update test to properly assert loaders
Update test to properly assert loaders

  import pytest
  import foyer
  
  
  def test_basic_import():
      assert 'forcefields' in dir(foyer)
  
  
- @pytest.mark.parametrize('ff_name', ['OPLSAA', 'TRAPPE_UA'])
+ @pytest.mark.parametrize('ff_loader', ['load_OPLSAA', 'load_TRAPPE_UA'])
- def test_forcefields_exist(ff_name):
+ def test_forcefields_exist(ff_loader):
-     ff_name in dir(foyer.forcefields)
+     assert ff_loader in dir(foyer.forcefields)
  
  
  def test_load_forcefield():
      OPLSAA = foyer.forcefields.get_forcefield(name='oplsaa')
      TRAPPE_UA = foyer.forcefields.get_forcefield(name='trappe-ua')
      with pytest.raises(ValueError):
          foyer.forcefields.get_forcefield('bogus_name')
  
Update test to properly assert loaders
## Code Before:
import pytest
import foyer


def test_basic_import():
    assert 'forcefields' in dir(foyer)


@pytest.mark.parametrize('ff_name', ['OPLSAA', 'TRAPPE_UA'])
def test_forcefields_exist(ff_name):
    ff_name in dir(foyer.forcefields)


def test_load_forcefield():
    OPLSAA = foyer.forcefields.get_forcefield(name='oplsaa')
    TRAPPE_UA = foyer.forcefields.get_forcefield(name='trappe-ua')
    with pytest.raises(ValueError):
        foyer.forcefields.get_forcefield('bogus_name')

## Instruction:
Update test to properly assert loaders
## Code After:
import pytest
import foyer


def test_basic_import():
    assert 'forcefields' in dir(foyer)


@pytest.mark.parametrize('ff_loader', ['load_OPLSAA', 'load_TRAPPE_UA'])
def test_forcefields_exist(ff_loader):
    assert ff_loader in dir(foyer.forcefields)


def test_load_forcefield():
    OPLSAA = foyer.forcefields.get_forcefield(name='oplsaa')
    TRAPPE_UA = foyer.forcefields.get_forcefield(name='trappe-ua')
    with pytest.raises(ValueError):
        foyer.forcefields.get_forcefield('bogus_name')
