def setUp(self): self.proj = common.activate_project({ 'main': ['basic'], }) state = State() state.create(1) self.task_state = state.get_task_state(1)
class CrossTests(unittest.TestCase): def setUp(self): self.state = State() self.task_id = 1 self.state.create(self.task_id) self.task_state = self.state.get_task_state(self.task_id) self.proj = common.activate(['main', 'cross']) def tearDown(self): common.deactivate() def test_cross_normalize_arguments(self): normalize_arguments( self.proj, self.task_state, 'basic/bar.py', 163) def test_cross_remove_argument(self): remove_argument( self.proj, self.task_state, 1, 'basic/bar.py', 163)
class CrossTests(unittest.TestCase): def setUp(self): self.state = State() self.task_id = 1 self.state.create(self.task_id) self.task_state = self.state.get_task_state(self.task_id) self.proj = common.activate_project({ 'main': ['basic'], 'cross': ['use_bar'], }) def tearDown(self): common.deactivate() def test_cross_normalize_arguments(self): normalize_arguments( self.proj, self.task_state, 'basic/bar.py', 163) common.compare_projects( 'cross_basic_normalize_arguments', 'main', 'basic') common.compare_projects( 'cross_use_bar_normalize_arguments', 'cross', 'use_bar') def test_cross_remove_argument(self): remove_argument( self.proj, self.task_state, 1, 'basic/bar.py', 163) common.compare_projects( 'cross_basic_remove_argument', 'main', 'basic') common.compare_projects( 'cross_use_bar_remove_argument', 'cross', 'use_bar')
def setUp(self): self.state = State() self.task_id = 1 self.state.create(self.task_id) self.task_state = self.state.get_task_state(self.task_id) self.proj = common.activate_project({ 'main': ['basic'], 'cross': ['use_bar'], })
def withFixture(self): with common.use_project({'main': ['basic'], 'cross': ['use_bar']}) as self.proj,\ common.use_proxy(State.start().proxy()) as self.state: self.task_id = 1 self.state.create(self.task_id).get() self.task_state = self.state.get_task_state(self.task_id).get() yield
class Tests(unittest.TestCase): def setUp(self): self.proj = common.activate_project({'main': ['basic']}) self.state = State() self.state.create(1) self.task_state = self.state.get_task_state(1) def tearDown(self): common.deactivate() def test_simple(self): rename(self.proj, self.task_state, 'Llama', 'basic/foo.py', 8) common.compare_projects( 'basic_rename_llama', 'main', 'basic')
def withFixture(self): with common.use_project({'main': ['basic']}) as self.proj,\ common.use_proxy(State.start().proxy()) as self.state: self.state.create(1).get() self.task_state = TaskState(self.state, 1) yield
def state(): state = State.start().proxy() try: yield state finally: state.stop()
def setUp(self): self.state = State() self.task_id = 1 self.state.create(self.task_id) self.task_state = self.state.get_task_state(self.task_id) self.proj = common.activate(['main', 'cross'])
def test_simple(self): state = State() state.create(1) task_state = state.get_task_state(1) rename(self.proj, task_state, 'Llama', 'basic/foo.py', 8)
def setUp(self): self.proj = common.activate(['main']) state = State() state.create(1) self.task_state = state.get_task_state(1)