old_contents: import uuid
  import nose
  from bluesky.testing.noseclasses import KnownFailureTest
  from nose.tools import assert_raises
  import time
  from bluesky.hardware_checklist import *
  
  
  def test_check_storage():
      check_storage('/', 1)
      assert_raises(RuntimeError, check_storage, '/', 10000000000000000000)
  
  
  def test_connect_channelarchiver():
      # Just test failure, not success.
      assert_raises(RuntimeError, connect_channelarchiver,
                    'http://bnl.gov/asfoijewapfoia')
  
  
  def test_connect_pv():
      try:
          import epics
      except ImportError:
          raise nose.SkipTest()
      pv_name = 'BSTEST:VAL'
      connect_pv(pv_name)
      epics.caput(pv_name, 5, wait=True)
      assert_pv_equal(pv_name, 5)
      assert_pv_greater(pv_name, 4)
      assert_pv_less(pv_name, 6)
      assert_pv_in_band(pv_name, 4, 6)
      assert_raises(AssertionError, assert_pv_in_band, pv_name, 2, 4)
      assert_pv_out_of_band(pv_name, 2, 4)
  
new_contents: import uuid
  from bluesky.testing import KnownFailureTest
  from bluesky.hardware_checklist import (
      assert_pv_equal, connect_pv, connect_channelarchiver, check_storage,
      assert_pv_greater, assert_pv_less, assert_pv_in_band, assert_pv_out_of_band
  )
  import pytest
  
  try:
      import requests
  except ImportError:
      requests = None
  
  
  def test_check_storage():
      check_storage('/', 1)
      with pytest.raises(RuntimeError):
          check_storage('/', 10000000000000000000)
  
  
  @pytest.mark.skipif(requests is None, reason=('requests is required to test '
                                                'channelarchiver connection'))
  def test_connect_channelarchiver():
      # Just test failure, not success.
      with pytest.raises(RuntimeError):
          connect_channelarchiver('http://bnl.gov/asfoijewapfoia')
  
  
  def test_connect_pv():
      try:
          import epics
      except ImportError:
          pytest.skip("Epics is not installed. Skipping epics test section of "
                      "bluesky")
      pv_name = 'BSTEST:VAL'
      connect_pv(pv_name)
      epics.caput(pv_name, 5, wait=True)
      assert_pv_equal(pv_name, 5)
      assert_pv_greater(pv_name, 4)
      assert_pv_less(pv_name, 6)
      assert_pv_in_band(pv_name, 4, 6)
      with pytest.raises(AssertionError):
          assert_pv_in_band(pv_name, 2, 4)
      assert_pv_out_of_band(pv_name, 2, 4)
  
subject: Move test_hardware_checklist to pytest