This repository was archived by the owner on Nov 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed
Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ jobs:
2121 pip install -e ".[dev]"
2222 - name : Run the tests
2323 run : |
24- nosetests
24+ make test
2525 - name : Check type annotations (strict)
2626 run : |
27- mypy --strict pantomime
27+ make check
2828 - name : Build a distribution
2929 run : |
3030 python setup.py sdist bdist_wheel
Original file line number Diff line number Diff line change 22all : clean test dists release
33
44test :
5- nosetests --with-coverage --cover-package=pantomime --cover-erase --cover-html --cover-html-dir=coverage-report
5+ pytest --cov-report html --cov-report term --cov=pantomime tests/
6+
7+ typecheck :
8+ mypy --strict pantomime/
69
710dists : clean
811 python setup.py sdist bdist_wheel
Original file line number Diff line number Diff line change 11from cgi import parse_header
22from typing import Any , Dict , Optional , Tuple
33from normality import stringify
4- from normality .encoding import normalize_encoding
4+ from normality .encoding import tidy_encoding
55
66from pantomime .types import DEFAULT , LABELS
77from pantomime .mappings import REPLACE
@@ -44,8 +44,7 @@ def charset(self) -> Optional[str]:
4444 charset = self .params .get ("charset" )
4545 if charset is None :
4646 return None
47- # return normalize_encoding(charset, default=None)
48- return normalize_encoding (charset )
47+ return tidy_encoding (charset )
4948
5049 @classmethod
5150 def split (cls , mime_type : Optional [str ]) -> Tuple [Optional [str ], Optional [str ]]:
Original file line number Diff line number Diff line change 2929 package_data = {"pantomime" : ["py.typed" ]},
3030 include_package_data = True ,
3131 zip_safe = False ,
32- test_suite = "nose.collector" ,
3332 install_requires = [
3433 "banal >= 0.3.5" ,
3534 "normality >= 0.5.6" ,
4342 "mypy" ,
4443 "black" ,
4544 "flake8>=2.6.0" ,
46- "nose" ,
45+ "pytest" ,
46+ "pytest-cov" ,
4747 "banal" ,
4848 "coverage>=4.1" ,
4949 ]
You can’t perform that action at this time.
0 commit comments