Skip to content

Commit

Permalink
Make rez-test tests cross-platform
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Morin <[email protected]>
  • Loading branch information
JeanChristopheMorinPerso committed Oct 14, 2024
1 parent 31d469c commit 3e695aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ def commands():

tests = {
"check_car_ideas": {
"command": "[[ -z ${CAR_IDEA} ]] && exit 1 || exit 0"
"command": "python -c 'import os; assert os.environ.get(\"CAR_IDEA\") == \"STURDY STEERING WHEEL\"'",
"requires": ["python"]
},
"move_meeting_to_noon": {
"command": "[[ -z ${SKIP_LUNCH} ]] && exit 1 || exit 0"
"command": "python -c 'import os; assert os.environ.get(\"SKIP_LUNCH\") is not None'",
"requires": ["python"]
}
}
4 changes: 2 additions & 2 deletions src/rez/tests/test_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def _run_tests(self, r):
failed_test = self._get_test_result(runner, "move_meeting_to_noon")

self.assertEqual(runner.test_results.num_tests, 2)
self.assertEqual(successful_test["status"], "success")
self.assertEqual(failed_test["status"], "failed")
self.assertEqual(successful_test["status"], "success", "check_car_ideas did not succeed")
self.assertEqual(failed_test["status"], "failed", "move_meeting_to_noon did not succeed")

def _get_test_result(self, runner, test_name):
return next(
Expand Down

0 comments on commit 3e695aa

Please sign in to comment.