Browse Source
* 📝 Update claims
* 🔖 Bump version to 2.0.7
* 🐛 Fix regression from PR #113 List instead of Set for alphabets property
* fix type output in alphabets property
* ✔️ Add test case to ensure non-regression upon 28c3ae15ad
* ✔️ Add tests and ignore old legacy methods cover
* ❇️ Add autofix script for black and isort linters
* 📝 Update contrib.md
* 🔧 Python 3.10 (using public release) tests
pull/125/head
2.0.7


11 changed files with 86 additions and 19 deletions
@ -0,0 +1,11 @@
|
||||
#!/bin/sh -e |
||||
|
||||
export PREFIX="" |
||||
if [ -d 'venv' ] ; then |
||||
export PREFIX="venv/bin/" |
||||
fi |
||||
|
||||
set -x |
||||
|
||||
${PREFIX}black --diff --target-version=py35 charset_normalizer |
||||
${PREFIX}isort --diff charset_normalizer |
@ -0,0 +1,20 @@
|
||||
import pytest |
||||
from charset_normalizer import normalize |
||||
from os.path import exists |
||||
from os import unlink |
||||
|
||||
|
||||
def test_normalize_fp_creation(): |
||||
guesses = normalize( |
||||
"./data/sample.1.ar.srt" |
||||
) |
||||
|
||||
predicted_path = "./data/sample.1.ar-{}.srt".format(guesses.best().encoding) |
||||
path_exist = exists( |
||||
"./data/sample.1.ar-{}.srt".format(guesses.best().encoding) |
||||
) |
||||
|
||||
assert path_exist is True |
||||
|
||||
if path_exist: |
||||
unlink(predicted_path) |
Loading…
Reference in new issue