def test(self): chk_equal(self.class_param_override, "Overridden", description="Checking that parameter is overridden") chk_equal(self.class_param, "Class Param") chk_log_value("Frequency {}".format(self.frequency), description="Just outputting the frequency") chk_log_value("Time {}".format(self.time)) user_info("This won't be in the report") chk_passes("This will be in the report")
def setup_config(): """ Configuration that is initialised on first import of fixate :return: """ global CONFIG_LOADED if not CONFIG_LOADED: try: fixate.config.RESOURCES["VISA_RESOURCE_MANAGER"] = visa.ResourceManager() except: fixate.config.RESOURCES["VISA_RESOURCE_MANAGER"] = None user_info("Warning no PyVISA install found") fixate.config.RESOURCES["SEQUENCER"] = Sequencer() load_local_config() CONFIG_LOADED = True
def test(self): user_info(self.pps.identify(as_string=True)) user_info(self.pps.baud_rate) self.pps.remote = True self.pps.remote = False self.pps.remote = True self.pps.voltage = 12 self.pps.output_ch1 = True time.sleep(1) self.pps.output_ch1 = False self.pps.voltage = 5.5 self.pps.output_ch1 = True time.sleep(1) self.pps.output_ch1 = False self.pps.voltage = 24 self.pps.output_ch1 = True time.sleep(1) self.pps.output_ch1 = False self.pps.voltage_max = 56 self.pps.current_max = 0.5 self.pps.output_ch1 = True resp = self.pps.read() user_info(resp) chk_passes("All Tests completed")
def setup(self): user_info("Tests can have setup")
def exit(self): user_info("Leaving the test list")
def enter(self): user_info("Entering the test list")
def test(self): user_info("Fingers crossed, this will pass") chk_true(True, "It is True!")
def teardown(self): user_info("Tests can have teardown")
def tear_down(self): user_info("Foo TearDown")
def set_up(self): user_info("Foo Setup")
def tear_down(self): user_info("Tearing down this function")
def test(self): user_info("Test")
def test(self): user_info("Line 1") user_info("Line 2") user_info("Line 3") user_info("Line 4") user_ok("Line 5")
def test(self): user_info("Fingers crossed, this will pass") user_image("base_test.jpg") user_ok("Press OK to continue") chk_true(True, "It is True!") user_image_clear()