Browse Source

Tidy up tests and circle config

tags/v0.1.1
Chris Smith 7 years ago
parent
commit
c4ab2689d1
3 changed files with 4 additions and 13 deletions
  1. 1
    6
      circle.yml
  2. 3
    0
      requirements.txt
  3. 0
    7
      test.py

+ 1
- 6
circle.yml View File

5
   services:
5
   services:
6
     - docker
6
     - docker
7
 
7
 
8
-dependencies:
9
-  pre:
10
-    - pip install nose pylint
11
-
12
 test:
8
 test:
13
-  override:
9
+  post:
14
     - pylint -d invalid-name docker-rerun
10
     - pylint -d invalid-name docker-rerun
15
-    - nosetests test.py
16
 
11
 

+ 3
- 0
requirements.txt View File

1
+nose
2
+pylint
3
+

+ 0
- 7
test.py View File

14
 
14
 
15
 
15
 
16
     def test_command_matches(self):
16
     def test_command_matches(self):
17
-        """
18
-        Tests that the command used to start a docker container exactly matches
19
-        that returned by ./docker-rerun --dry-run.
20
-        """
21
         commands = [
17
         commands = [
22
             'docker run --name=test123 -d hello-world',
18
             'docker run --name=test123 -d hello-world',
23
             'docker run --name=test123 --restart=always -d hello-world',
19
             'docker run --name=test123 --restart=always -d hello-world',
37
                 self.assertEqual(output[3], command)
33
                 self.assertEqual(output[3], command)
38
                 self._run(['docker', 'rm', '-f', 'test123'])
34
                 self._run(['docker', 'rm', '-f', 'test123'])
39
 
35
 
40
-
41
-if __name__ == '__main__':
42
-    unittest.main()

Loading…
Cancel
Save