""" test data_checksums"""
from nose.tools import assert_equal


def test_data_checksums():
    from pyne.data import data_checksums
    assert_equal(len(data_checksums), 6)
    assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be')
""" test data_checksums and hashing functions"""
import os

from nose.tools import assert_equal, assert_true

import pyne

# These tests require nuc_data
if not os.path.isfile(pyne.nuc_data):
    raise RuntimeError("Tests require nuc_data.h5.  Please run nuc_data_make.")

def test_data_checksums():
    from pyne.data import data_checksums
    assert_equal(len(data_checksums), 6)
    assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be')

def test_internal_hashes():
    from pyne.dbgen import hashtools
    hashtools.set_internal_hashes(pyne.nuc_data)
    for item, val in hashtools.check_internal_hashes(pyne.nuc_data):
        assert_true(val)


Add test of internal hashes and guarded pyne.nuc_data use
Add test of internal hashes and guarded pyne.nuc_data use

- """ test data_checksums"""
- from nose.tools import assert_equal
+ """ test data_checksums and hashing functions"""
+ import os
  
+ from nose.tools import assert_equal, assert_true
+ 
+ import pyne
+ 
+ # These tests require nuc_data
+ if not os.path.isfile(pyne.nuc_data):
+     raise RuntimeError("Tests require nuc_data.h5.  Please run nuc_data_make.")
  
  def test_data_checksums():
      from pyne.data import data_checksums
      assert_equal(len(data_checksums), 6)
      assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be')
+ 
+ def test_internal_hashes():
+     from pyne.dbgen import hashtools
+     hashtools.set_internal_hashes(pyne.nuc_data)
+     for item, val in hashtools.check_internal_hashes(pyne.nuc_data):
+         assert_true(val)
+ 
+ 
Add test of internal hashes and guarded pyne.nuc_data use
## Code Before:
""" test data_checksums"""
from nose.tools import assert_equal


def test_data_checksums():
    from pyne.data import data_checksums
    assert_equal(len(data_checksums), 6)
    assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be')
## Instruction:
Add test of internal hashes and guarded pyne.nuc_data use
## Code After:
""" test data_checksums and hashing functions"""
import os

from nose.tools import assert_equal, assert_true

import pyne

# These tests require nuc_data
if not os.path.isfile(pyne.nuc_data):
    raise RuntimeError("Tests require nuc_data.h5.  Please run nuc_data_make.")

def test_data_checksums():
    from pyne.data import data_checksums
    assert_equal(len(data_checksums), 6)
    assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be')

def test_internal_hashes():
    from pyne.dbgen import hashtools
    hashtools.set_internal_hashes(pyne.nuc_data)
    for item, val in hashtools.check_internal_hashes(pyne.nuc_data):
        assert_true(val)

