File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -103,19 +103,19 @@ def test_add_anod_action2(self):
103
103
def test_add_anod_action2_force_install (self ):
104
104
"""Check that forcing an install with no package is rejected."""
105
105
ac = self .create_context ()
106
- try :
106
+ with pytest . raises ( SchedulingError ) as err :
107
107
ac .add_anod_action (
108
108
"spec2" ,
109
109
env = ac .default_env ,
110
110
primitive = "install" ,
111
111
plan_args = {},
112
112
plan_line = "install_plan.txt:2" ,
113
113
)
114
- except SchedulingError as err :
115
- assert (
116
- "error in plan at install_plan.txt:2: install should "
117
- "be replaced by build" in str (err )
118
- )
114
+
115
+ assert (
116
+ "error in plan at install_plan.txt:2: install should be replaced by build "
117
+ in str (err )
118
+ )
119
119
120
120
def test_add_anod_action2_no_source_resolver (self ):
121
121
def no_resolver (action , decision ):
@@ -637,7 +637,6 @@ def anod_action(
637
637
myplan .load ("plan.plan" )
638
638
639
639
if not reject_duplicates :
640
- # Execute the plan and create anod actions
641
640
# Execute the plan and create anod actions
642
641
for action in cm .execute (myplan , "myserver" ):
643
642
ac .add_plan_action (action )
You can’t perform that action at this time.
0 commit comments