Skip to content

Commit

Permalink
Path fix on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TAHRI Ahmed R committed Aug 7, 2019
1 parent 9f75c21 commit e5e0385
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/test_on_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class TestFileCharsetNormalizer(unittest.TestCase):
}

def test_file_input(self):
for path_name in glob('../data/*.srt') + glob('../data/*.txt'):
for path_name in glob('./data/*.srt') + glob('./data/*.txt'):

with self.subTest('test_file_input <{}>'.format(path_name)):

Expand Down
6 changes: 3 additions & 3 deletions test/test_probe_coherence.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
class TestProbeCoherence(unittest.TestCase):
def test_obvious_coherence_gap(self):

should_be_most_coherent = CharsetNormalizerMatches.from_path('../data/sample.1.ar.srt').best().first().coherence
should_be_most_coherent = CharsetNormalizerMatches.from_path('./data/sample.1.ar.srt').best().first().coherence

with open('../data/sample.1.ar.srt', 'r', encoding='mac_cyrillic') as fp:
with open('./data/sample.1.ar.srt', 'r', encoding='mac_cyrillic') as fp:
r_ = ProbeCoherence(Counter(fp.read())).ratio

with open('../data/sample.1.ar.srt', 'r', encoding='cp1251') as fp:
with open('./data/sample.1.ar.srt', 'r', encoding='cp1251') as fp:
t_ = ProbeCoherence(Counter(fp.read())).ratio

self.assertLess(
Expand Down

0 comments on commit e5e0385

Please sign in to comment.