Changeset 7485cfa in sasview for calculatorview/src/sans/perspectives/calculator
- Timestamp:
- Jan 18, 2012 9:51:45 AM (13 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- f505470
- Parents:
- 530cc84
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/src/sans/perspectives/calculator/model_editor.py
r530cc84 r7485cfa 618 618 #function here 619 619 """ 620 TEST_TEMPLATE = """621 ######################################################################622 ## THIS IS FOR TEST. DO NOT MODIFY THE FOLLOWING LINES!!!!!!!!!!!!!!!!623 if __name__ == "__main__":624 m= Model()625 out1 = m.runXY(0.0)626 out2 = m.runXY(0.01)627 isfine1 = numpy.isfinite(out1)628 isfine2 = numpy.isfinite(out2)629 print "Testing the value at Q = 0.0:"630 print out1, " : finite? ", isfine1631 print "Testing the value at Q = 0.01:"632 print out2, " : finite? ", isfine2633 if isfine1 and isfine2:634 print "===> Simple Test: Passed!"635 else:636 print "===> Simple Test: Failed!"637 """638 620 CUSTOM_2D_TEMP = """ 639 621 def run(self, x=0.0): … … 646 628 raise ValueError, msg 647 629 else: 648 return self.function(x, x)630 return self.function(x, 0.0) 649 631 def runXY(self, x=0.0, y=0.0): 650 632 if x.__class__.__name__ == 'list': … … 671 653 iq_array = v_model(qdist) 672 654 return iq_array 655 """ 656 TEST_TEMPLATE = """ 657 ###################################################################### 658 ## THIS IS FOR TEST. DO NOT MODIFY THE FOLLOWING LINES!!!!!!!!!!!!!!!! 659 if __name__ == "__main__": 660 m= Model() 661 out1 = m.runXY(0.0) 662 out2 = m.runXY(0.01) 663 isfine1 = numpy.isfinite(out1) 664 isfine2 = numpy.isfinite(out2) 665 print "Testing the value at Q = 0.0:" 666 print out1, " : finite? ", isfine1 667 print "Testing the value at Q = 0.01:" 668 print out2, " : finite? ", isfine2 669 if isfine1 and isfine2: 670 print "===> Simple Test: Passed!" 671 else: 672 print "===> Simple Test: Failed!" 673 673 """ 674 674 SUM_TEMPLATE = """ … … 969 969 dir_path = models.find_plugins_dir() 970 970 app = wx.App() 971 window = EditorWindow(parent=None, base=None, path=dir_path, title=" AAA")971 window = EditorWindow(parent=None, base=None, path=dir_path, title="Editor") 972 972 app.MainLoop()
Note: See TracChangeset
for help on using the changeset viewer.