-
Notifications
You must be signed in to change notification settings - Fork 53
Test for checking files in repo #108
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import os | ||
|
||
try: | ||
import unittest2 as unittest | ||
except ImportError: | ||
import unittest | ||
|
||
class ProjectTests(unittest.TestCase): | ||
|
||
# ./Docker or docker/Docker | ||
def test_docker_dir(self): | ||
self.assertEqual(True, os.path.isdir("./Dockerfile")) | ||
|
||
# ./docker-compose.yml or ./docker/docker-compose.yml | ||
def test_docker_compose(self): | ||
self.assertEqual(True, os.path.isfile('docker-compose.yml')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./.env_sample | ||
def test_env(self): | ||
self.assertEqual(True, os.path.isfile('./env_sample')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./.gitignore | ||
def test_gitignore(self): | ||
self.assertEqual(True, os.path.isfile('./.gitignore')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./.travis.yml | ||
def test_travis(self): | ||
self.assertEqual(True, os.path.isfile('./.travis.yml')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./.codeclimate.yml | ||
def test_codeclimate(self): | ||
self.assertEqual(True, os.path.isfile('./.codeclimate.yml')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./CHANGELOG.md | ||
def test_changelog(self): | ||
self.assertEqual(True, os.path.isfile('./CHANGELOG.md')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./CODE_OF_CONDUCT.md | ||
def test_code_of_conduct(self): | ||
self.assertEqual(True, os.path.isfile('./CODE_OF_CONDUCT.md')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./CONTRIBUTING.md | ||
def test_contributing(self): | ||
self.assertEqual(True, os.path.isfile('./CONTRIBUTING.md')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./.github/ISSUE_TEMPLATE | ||
def test_issue_template(self): | ||
self.assertEqual(True, os.path.isfile('./.github/ISSUE_TEMPLATE')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./LICENSE.md | ||
def test_license(self): | ||
self.assertEqual(True, os.path.isfile('./LICENSE.txt')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./.github/PULL_REQUEST_TEMPLATE | ||
def test_pr_template(self): | ||
self.assertEqual(True, os.path.isfile('./.github/PULL_REQUEST_TEMPLATE')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./README.md | ||
def test_readme(self): | ||
self.assertEqual(True, os.path.isfile('./README.md')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./TROUBLESHOOTING.md | ||
def test_troubleshooting(self): | ||
self.assertEqual(True, os.path.isfile('./TROUBLESHOOTING.md')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./USAGE.md | ||
def test_usage(self): | ||
self.assertEqual(True, os.path.isfile('./USAGE.md')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# ./USE_CASES.md | ||
def test_use_cases(self): | ||
self.assertEqual(True, os.path.isfile('./USE_CASES.md')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing 4 spaces of indentation >>> import unittest
...
... if __name__ == '__main__':
... unittest.main()
File "<input>", line 4
unittest.main()
^
IndentationError: expected an indented block |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.assertTrue(...)
?