def setup_class(cls): cls.exp = builder.experiment.Experiment() # create once, not every test cls.here = os.path.abspath(os.path.dirname(__file__)) cls.baselineProfile = os.path.join(cls.here, profile) # should not need a wx.App with fetchIcons=False try: cls.allComp = getAllComponents(fetchIcons=False) except: import wx tmpApp = wx.PySimpleApp() try: from psychopy.app import localization except: pass # not needed if can't import it cls.allComp = getAllComponents(fetchIcons=False)
def setup_class(cls): cls.exp = builder.experiment.Experiment() # create once, not every test cls.here = os.path.abspath(os.path.dirname(__file__)) cls.baselineProfile = os.path.join(cls.here, profile) # should not need a wx.App with fetchIcons=False try: cls.allComp = getAllComponents(fetchIcons=False) except: import wx if wx.version() < '2.9': tmpApp = wx.PySimpleApp() else: tmpApp = wx.App(False) try: from psychopy.app import localization except: pass # not needed if can't import it cls.allComp = getAllComponents(fetchIcons=False)
def stop(self, pos): super(EllipseTool, self).stop(pos) component_class = components.getAllComponents()["BasicShapeComponent"] pos, size = self.extent_to_norm() component = component_class( self.window.routine.exp, self.window.routine.name, units='norm', pos=pos, size=size, shape="ellipse") return component
def stop(self, pos): super(EllipseTool, self).stop(pos) component_class = components.getAllComponents()["BasicShapeComponent"] pos, size = self.extent_to_norm() component = component_class(self.window.routine.exp, self.window.routine.name, units='norm', pos=pos, size=size, shape="ellipse") return component
from psychopy.app.builder.components import getAllComponents # usage: generate or compare all Component.param settings & options # motivation: catch deviations introduced during refactoring # use --out to generate a new target file (sent to sys.stdout, so redirect to a file) # or compare against a prior run (x.out.master.de55d49.txt) # current target file is x.out.master.de55d49.txt, which is the output of this script --out # as run on upstream/master branch @ de55d49, with edits to fix known-good changes # introduced by refactoring: nVertices 4, Patch interpolation 'linear' # should not need a wx.App with fetchIcons=False try: allComp = getAllComponents(fetchIcons=False) except: import wx if wx.version() < '2.9': tmpApp = wx.PySimpleApp() else: tmpApp = wx.App(False) try: from psychopy.app import localization except: pass # not needed if can't import it allComp = getAllComponents(fetchIcons=False) exp = builder.experiment.Experiment() if not '--out' in sys.argv: target = open('componsTemplate.txt', 'rU').read() targetLines = target.splitlines()
if wx.version() < '2.9': tmpApp = wx.PySimpleApp() else: tmpApp = wx.App(False) from psychopy.app import builder from psychopy.app.builder.components import getAllComponents # usage: generate or compare all Component.param settings & options # motivation: catch deviations introduced during refactoring # use --out to re-generate componsTemplate.txt # should not need a wx.App with fetchIcons=False try: allComp = getAllComponents(fetchIcons=False) except: import wx if wx.version() < '2.9': tmpApp = wx.PySimpleApp() else: tmpApp = wx.App(False) try: from psychopy.app import localization except: pass # not needed if can't import it allComp = getAllComponents(fetchIcons=False) exp = builder.experiment.Experiment() relPath = os.path.join(os.path.split(__file__)[0], 'componsTemplate.txt') if not '--out' in sys.argv: