Skip to content

Commit

Permalink
Fix some PEP8 issues in tardis/conftest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yeganer authored and ftsamis committed Nov 12, 2016
1 parent 554e57a commit 8c5ba42
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions tardis/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
# Astropy
###

## Uncomment the following line to treat all DeprecationWarnings as
## exceptions
# Uncomment the following line to treat all DeprecationWarnings as
# exceptions
# enable_deprecations_as_exceptions()

## Uncomment and customize the following lines to add/remove entries from
## the list of packages for which version numbers are displayed when running
## the tests. Making it pass for KeyError is essential in some cases when
## the package uses other astropy affiliated packages.
# Uncomment and customize the following lines to add/remove entries from
# the list of packages for which version numbers are displayed when running
# the tests. Making it pass for KeyError is essential in some cases when
# the package uses other astropy affiliated packages.
try:
PYTEST_HEADER_MODULES['Numpy'] = 'numpy'
PYTEST_HEADER_MODULES['Scipy'] = 'scipy'
Expand All @@ -54,13 +54,13 @@
except (NameError, KeyError): # NameError is needed to support Astropy < 1.0
pass

## Uncomment the following lines to display the version number of the
## package rather than the version number of Astropy in the top line when
## running the tests.
# Uncomment the following lines to display the version number of the
# package rather than the version number of Astropy in the top line when
# running the tests.
import os

## This is to figure out the affiliated package version, rather than
## using Astropy's
# This is to figure out the affiliated package version, rather than
# using Astropy's
try:
from .version import version
except ImportError:
Expand Down Expand Up @@ -125,12 +125,6 @@ def pytest_unconfigure(config):
os.unlink(config.option.htmlpath)
print "Deleted temporary file containing html report."

# -------------------------------------------------------------------------
# hooks for influencing reporting (invoked from _pytest_terminal)
# -------------------------------------------------------------------------



# -------------------------------------------------------------------------
# project specific fixtures
# -------------------------------------------------------------------------
Expand All @@ -155,15 +149,18 @@ def kurucz_atomic_data(atomic_data_fname):
else:
return atomic_data


@pytest.fixture
def test_data_path():
return os.path.join(tardis.__path__[0], 'tests', 'data')


@pytest.fixture
def included_he_atomic_data(test_data_path):
atomic_db_fname = os.path.join(test_data_path, 'chianti_he_db.h5')
return AtomData.from_hdf5(atomic_db_fname)


@pytest.fixture
def tardis_config_verysimple():
return yaml_load_config_file(
Expand Down

0 comments on commit 8c5ba42

Please sign in to comment.