-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathtest_project.py
More file actions
69 lines (52 loc) · 1.77 KB
/
test_project.py
File metadata and controls
69 lines (52 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import os
import unittest
class ProjectTests(unittest.TestCase):
# ./Docker or docker/Docker
def test_docker_dir(self):
self.assertTrue(
os.path.isfile("./Dockerfile")
or os.path.isdir("./docker/Dockerfile")
)
# ./docker-compose.yml or ./docker/docker-compose.yml
def test_docker_compose(self):
self.assertTrue(
os.path.isfile('./docker-compose.yml')
or os.path.isfile('./docker/docker-compose.yml')
)
# ./.env_sample
def test_env(self):
self.assertTrue(os.path.isfile('./.env_sample'))
# ./.gitignore
def test_gitignore(self):
self.assertTrue(os.path.isfile('./.gitignore'))
# ./CHANGELOG.md
def test_changelog(self):
self.assertTrue(os.path.isfile('./CHANGELOG.md'))
# ./CODE_OF_CONDUCT.md
def test_code_of_conduct(self):
self.assertTrue(os.path.isfile('./CODE_OF_CONDUCT.md'))
# ./CONTRIBUTING.md
def test_contributing(self):
self.assertTrue(os.path.isfile('./CONTRIBUTING.md'))
# ./LICENSE
def test_license(self):
self.assertTrue(os.path.isfile('./LICENSE'))
# ./PULL_REQUEST_TEMPLATE.md
def test_pr_template(self):
self.assertTrue(
os.path.isfile('./PULL_REQUEST_TEMPLATE.md')
)
# ./README.rst
def test_readme(self):
self.assertTrue(os.path.isfile('./README.rst'))
# ./TROUBLESHOOTING.md
def test_troubleshooting(self):
self.assertTrue(os.path.isfile('./TROUBLESHOOTING.md'))
# ./USAGE.md
def test_usage(self):
self.assertTrue(os.path.isfile('./USAGE.md'))
# ./VERSION.txt
def test_use_cases(self):
self.assertTrue(os.path.isfile('./VERSION.txt'))
if __name__ == '__main__':
unittest.main()