File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ from os import path
2
+ try :
3
+ import unittest2 as unittest
4
+ except ImportError :
5
+ import unittest
6
+
7
+
8
+ class RepoFiles (unittest .TestCase ):
9
+ FILES = [
10
+ ['./Dockerfile' , './docker/Dockerfile' ],
11
+ ['./docker-compose.yml' , './docker/docker-compose.yml' ],
12
+ ['./.env_sample' ],
13
+ ['./.gitignore' ],
14
+ ['./.travis.yml' ],
15
+ ['./.codeclimate.yml' ],
16
+ ['./CHANGELOG.md' ],
17
+ ['./CODE_OF_CONDUCT.md' ],
18
+ ['./CONTRIBUTING.md' ],
19
+ ['./.github/ISSUE_TEMPLATE' ],
20
+ ['./LICENSE.md' , './LICENSE.txt' ],
21
+ ['./.github/PULL_REQUEST_TEMPLATE' ],
22
+ ['./README.md' ],
23
+ ['./TROUBLESHOOTING.md' ],
24
+ ['./USAGE.md' ],
25
+ ['./USE_CASES.md' ]
26
+ ]
27
+
28
+ def _all_file (self , files ):
29
+ '''
30
+ Checks the list of files and sees if they exist. If all of them don't
31
+ exist, returns False. Otherwise, return True.
32
+ '''
33
+ return all (map (lambda f : not path .isfile (f ), files ))
34
+
35
+ def test_file_existance (self ):
36
+ missing = list (filter (self ._all_file , self .FILES ))
37
+ self .assertTrue (len (missing ) == 0 ,
38
+ "Files %s aren't found" % str (missing ))
You can’t perform that action at this time.
0 commit comments