Skip to content

Commit

Permalink
chore: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
philipdelorenzo committed Oct 19, 2024
1 parent c7abc13 commit a4f440a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ install: ##@repo Installs needed prerequisites and software to develop in the SR
@.python/bin/pip install -r src/requirements.txt
@asdf reshim

run-tests: ##@repo Run tests
$(info ********** Running Tests **********)
@bash test/run_tests.sh -u

############# Development Section #############
help: ##@misc Show this help.
@echo $(MAKEFILE_LIST)
Expand Down
13 changes: 11 additions & 2 deletions src/test_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ def test_repo(self):

def test_prerequisites(self):
self.args = Args()
assert prerequisites(args=self.args) == True, "The --target_repo argument is not set."

self.args.target_repo = ""
self.assertRaises(RepoError, prerequisites(), args=self.args), "The --target_repo argument is not set."

with self.assertRaises(RepoError):
prerequisites(args=self.args)

self.args.target_repo = None
with self.assertRaises(RepoError):
prerequisites(args=self.args)



0 comments on commit a4f440a

Please sign in to comment.