Skip to content

Commit f524f41

Browse files
alexbnavigator
andauthored
Added simple tests and CI (#140)
* add 2 basic unit tests * Add Github workflow for pytest run * Various cleanups Co-authored-by: Benjamin Greiner <[email protected]>
1 parent 015cba9 commit f524f41

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request: {}
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install test dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install pytest
25+
- name: Test with pytest
26+
run: |
27+
pytest

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
include MANIFEST.in README.rst LICENSE certifi/cacert.pem
2+
3+
exclude .github/
4+
recursive-exclude .github

certifi/tests/__init__.py

Whitespace-only changes.

certifi/tests/test_certify.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# -*- coding: utf-8 -*-
2+
3+
import os
4+
import unittest
5+
6+
import certifi
7+
8+
9+
class TestCertifi(unittest.TestCase):
10+
def test_cabundle_exists(self):
11+
assert os.path.exists(certifi.where())
12+
13+
def test_read_contents(self):
14+
content = certifi.contents()
15+
assert "-----BEGIN CERTIFICATE-----" in content

0 commit comments

Comments
 (0)