diff options
author | Marcel Hellkamp <marc@gsites.de> | 2018-10-25 20:07:11 +0200 |
---|---|---|
committer | Marcel Hellkamp <marc@gsites.de> | 2018-10-25 20:49:23 +0200 |
commit | 9fb3b05846b33e508545a26e424785e151d02323 (patch) | |
tree | 38fd555bb1f627aa937e88b5f113b3f3c4d7f827 | |
parent | 4dab7d81a7a843541088d397011ac2f132791ff7 (diff) | |
download | bottle-9fb3b05846b33e508545a26e424785e151d02323.tar.gz |
Migrated to CircleCI 2.0
-rw-r--r-- | .circleci/config.yml | 49 | ||||
-rw-r--r-- | circle.yml | 13 | ||||
-rwxr-xr-x | test/test_sendfile.py | 5 |
3 files changed, 54 insertions, 13 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..a0a9ecb --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,49 @@ +version: 2 +workflows: + version: 2 + test: + jobs: + - test-2.7 + - test-3.3 + - test-3.4 + - test-3.5 + - test-3.6 + - test-3.7 +jobs: + test-3.7: &test-template + parallelism: 1 + docker: + - image: circleci/python:3.7 + environment: + CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results + steps: + - checkout + - run: python --version + - run: python -m unittest discover + - store_test_results: + path: /tmp/circleci-test-results + - store_artifacts: + path: /tmp/circleci-artifacts + - store_artifacts: + path: /tmp/circleci-test-results + test-3.6: + <<: *test-template + docker: + - image: circleci/python:3.6 + test-3.5: + <<: *test-template + docker: + - image: circleci/python:3.5 + test-3.4: + <<: *test-template + docker: + - image: circleci/python:3.4 + test-3.3: + <<: *test-template + docker: + - image: circleci/python:3.3 + test-2.7: + <<: *test-template + docker: + - image: circleci/python:2.7 diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 45b6dfd..0000000 --- a/circle.yml +++ /dev/null @@ -1,13 +0,0 @@ -test: - override: - - pyenv versions - - pyenv shell 2.7.3; eval "$(pyenv init -)"; python --version; python -m unittest discover - - pyenv shell 2.7; eval "$(pyenv init -)"; python --version; python -m unittest discover - - pyenv shell 3.3-dev; eval "$(pyenv init -)"; python --version; python -m unittest discover - - pyenv shell 3.4-dev; eval "$(pyenv init -)"; python --version; python -m unittest discover - - pyenv shell 3.5-dev; eval "$(pyenv init -)"; python --version; python -m unittest discover - - pyenv shell 3.6-dev; eval "$(pyenv init -)"; python --version; python -m unittest discover - - pyenv shell pypy-2.2; eval "$(pyenv init -)"; python --version; python -m unittest discover - - pyenv shell pypy-2.3; eval "$(pyenv init -)"; python --version; python -m unittest discover - - pyenv shell pypy-2.4; eval "$(pyenv init -)"; python --version; python -m unittest discover - - pyenv shell pypy-2.5; eval "$(pyenv init -)"; python --version; python -m unittest discover diff --git a/test/test_sendfile.py b/test/test_sendfile.py index 3de6c50..6872e4d 100755 --- a/test/test_sendfile.py +++ b/test/test_sendfile.py @@ -55,6 +55,11 @@ class TestSendFile(unittest.TestCase): self.assertEqual(404, static_file('not/a/file', root=root).status_code) f = static_file(os.path.join('./../', basename), root='./views/') self.assertEqual(403, f.status_code) + + def test_file_not_readable(self): + if os.geteuid() == 0: + return # Root can read anything + try: fp, fn = tempfile.mkstemp() os.chmod(fn, 0) |