@@ -272,11 +272,28 @@ def test_verbose_flag(self):
272272 """Verify that that 9pm verbose output works (-v)"""
273273
274274 self .run (["cases/worker.py" , "cases/worker.py" ], ["-v" ], 0 , "Verbose output turned on" )
275+ print_green (f"[PASS] Verbose flag works (-v)" )
275276
276277 def test_abort_flag (self ):
277278 """Verify that that 9pm abort flag works (--abort)"""
278279
279280 self .run (["cases/fail.sh" , "cases/pass.sh" ], ["--abort" ], 1 , "Aborting execution" )
281+ print_green (f"[PASS] Abort flag works (-a --abort)" )
282+
283+ def test_proj_config (self ):
284+ """Verify that that 9pm project config works (--proj)"""
285+
286+ self .run (["cases/pass.sh" ], ["-v" ], 0 , "Testing 9pm" )
287+
288+ self .run (["cases/pass.sh" ], ["-v" , "--proj" , "configs/proj-test1.yaml" ], 0 , "Testing Self Test 1" )
289+
290+ self .env ["NINEPM_PROJ_CONFIG" ] = "configs/proj-test2.yaml"
291+ self .run (["cases/pass.sh" ], ["-v" ], 0 , "Testing Self Test 2" )
292+ # This shall have precedence over env
293+ self .run (["cases/pass.sh" ], ["-v" , "--proj" , "configs/proj-test1.yaml" ], 0 , "Testing Self Test 1" )
294+ del self .env ["NINEPM_PROJ_CONFIG" ]
295+
296+ print_green (f"[PASS] Project Config works" )
280297
281298 def test_repeat_flag (self ):
282299 """Verify that -r (--repeat) works"""
@@ -339,6 +356,7 @@ def cleanup(self):
339356 tester .test_verbose_flag ()
340357 tester .test_abort_flag ()
341358 tester .test_repeat_flag ()
359+ tester .test_proj_config ()
342360 print_green ("All tests passed." )
343361 finally :
344362 tester .cleanup ()
0 commit comments