old_contents: # -*- coding: utf-8 -*-
  import numpy as np
  import ibei
  from astropy import units
  import unittest
  
  temp_sun = 5762.
  temp_earth = 288.
  bandgap = 1.15
  
  class Issues(unittest.TestCase):
      """
      Tests output types of the calculator methods.
      """
  
      # def test_issue_1_devos_efficiency(self):
      #     """
      #     Unit system needs to be specified for astropy.constants.e to work.
      #     """
      #     try:
      #         ibei.devos_efficiency(bandgap, temp_sun, temp_earth, 1.09)
      #     except:
      #         self.fail("Unit system not initialized.")
  
new_contents: # -*- coding: utf-8 -*-
  import numpy as np
  import ibei
  from astropy import units
  import unittest
  
  temp_sun = 5762.
  temp_earth = 288.
  bandgap = 1.15
  
  input_params = {"temp_sun": temp_sun,
                  "temp_earth": temp_earth,
                  "bandgap": bandgap,
                  "voltage": 0.5,}
  
  class Issues(unittest.TestCase):
      """
      Tests output types of the calculator methods.
      """
  
      # def test_issue_1_devos_efficiency(self):
      #     """
      #     Unit system needs to be specified for astropy.constants.e to work.
      #     """
      #     try:
      #         ibei.devos_efficiency(bandgap, temp_sun, temp_earth, 1.09)
      #     except:
      #         self.fail("Unit system not initialized.")
  
  class SBSolarcellCalculatorsReturnUnits(unittest.TestCase):
      """
      Tests units of the calculator methods returned values.
      """
      def setUp(self):
          """
          Initialize SBSolarcell object from input_params
          """
          self.solarcell = ibei.SQSolarcell(input_params)
  
  
      def test_calc_blackbody_radiant_power_density(self):
          """
          calc_blackbody_radiant_power_density should return value with unit of W m^-2.
          """
          tested_unit = self.solarcell.calc_blackbody_radiant_power_density().unit
          target_unit = units.Unit("W/m2")
          self.assertEqual(tested_unit, target_unit)
  
  
  if __name__ == "__main__":
      pass
  
subject: Test unit from calc_blackbody_radiant_power_density