Skip to content
This repository was archived by the owner on Aug 28, 2020. It is now read-only.

Test for checking files in repo #108

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions test/test_files.py
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"))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./docker-compose.yml or ./docker/docker-compose.yml
def test_docker_compose(self):
self.assertEqual(True, os.path.isfile('docker-compose.yml'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./.env_sample
def test_env(self):
self.assertEqual(True, os.path.isfile('./env_sample'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./.gitignore
def test_gitignore(self):
self.assertEqual(True, os.path.isfile('./.gitignore'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./.travis.yml
def test_travis(self):
self.assertEqual(True, os.path.isfile('./.travis.yml'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./.codeclimate.yml
def test_codeclimate(self):
self.assertEqual(True, os.path.isfile('./.codeclimate.yml'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./CHANGELOG.md
def test_changelog(self):
self.assertEqual(True, os.path.isfile('./CHANGELOG.md'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./CODE_OF_CONDUCT.md
def test_code_of_conduct(self):
self.assertEqual(True, os.path.isfile('./CODE_OF_CONDUCT.md'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./CONTRIBUTING.md
def test_contributing(self):
self.assertEqual(True, os.path.isfile('./CONTRIBUTING.md'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./.github/ISSUE_TEMPLATE
def test_issue_template(self):
self.assertEqual(True, os.path.isfile('./.github/ISSUE_TEMPLATE'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./LICENSE.md
def test_license(self):
self.assertEqual(True, os.path.isfile('./LICENSE.txt'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./.github/PULL_REQUEST_TEMPLATE
def test_pr_template(self):
self.assertEqual(True, os.path.isfile('./.github/PULL_REQUEST_TEMPLATE'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./README.md
def test_readme(self):
self.assertEqual(True, os.path.isfile('./README.md'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./TROUBLESHOOTING.md
def test_troubleshooting(self):
self.assertEqual(True, os.path.isfile('./TROUBLESHOOTING.md'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./USAGE.md
def test_usage(self):
self.assertEqual(True, os.path.isfile('./USAGE.md'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


# ./USE_CASES.md
def test_use_cases(self):
self.assertEqual(True, os.path.isfile('./USE_CASES.md'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertTrue(...) ?


if __name__ == '__main__':
unittest.main()
Copy link

Choose a reason for hiding this comment

The 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