[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing unit tests. #13

Closed
dan-blanchard opened this issue Dec 17, 2013 · 8 comments
Closed

Fix failing unit tests. #13

dan-blanchard opened this issue Dec 17, 2013 · 8 comments

Comments

@dan-blanchard
Copy link
Member

Currently, the following 27 unit tests fail. We need to figure that out and fix them.

.FFF.FF..FFF........F............................................................................................................................................F.......FFFFFFF.FFFFFF.......................................F....F.FF.........................................................................................................................................................
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'iso-8859-7'
- iso-8859-2
?          ^
+ iso-8859-7
?          ^
 : Expected iso-8859-7, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/iso-8859-7-greek/naftemporiki.gr.bus.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'iso-8859-7'
- iso-8859-2
?          ^
+ iso-8859-7
?          ^
 : Expected iso-8859-7, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/iso-8859-7-greek/naftemporiki.gr.cmm.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'iso-8859-7'
- iso-8859-2
?          ^
+ iso-8859-7
?          ^
 : Expected iso-8859-7, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/iso-8859-7-greek/naftemporiki.gr.fin.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'iso-8859-7'
- iso-8859-2
?          ^
+ iso-8859-7
?          ^
 : Expected iso-8859-7, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/iso-8859-7-greek/naftemporiki.gr.mrt.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'windows-1253' != 'iso-8859-7'
- windows-1253
+ iso-8859-7
 : Expected iso-8859-7, but got 'windows-1253' in /home/travis/build/erikrose/chardet/tests/iso-8859-7-greek/disabled.gr.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'iso-8859-7'
- iso-8859-2
?          ^
+ iso-8859-7
?          ^
 : Expected iso-8859-7, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/iso-8859-7-greek/naftemporiki.gr.spo.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'iso-8859-7'
- iso-8859-2
?          ^
+ iso-8859-7
?          ^
 : Expected iso-8859-7, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/iso-8859-7-greek/naftemporiki.gr.mrk.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'iso-8859-7'
- iso-8859-2
?          ^
+ iso-8859-7
?          ^
 : Expected iso-8859-7, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/iso-8859-7-greek/naftemporiki.gr.wld.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'utf-8'
- iso-8859-2
+ utf-8
 : Expected utf-8, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/utf-8/bom-utf-8.srt
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'maccyrillic' != 'iso-8859-6'
- maccyrillic
+ iso-8859-6
 : Expected iso-8859-6, but got 'MacCyrillic' in /home/travis/build/erikrose/chardet/tests/iso-8859-6-arabic/_chromium_ISO-8859-6_with_no_encoding_specified.html
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'latin1'
- iso-8859-2
+ latin1
 : Expected latin1, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/latin1/_ude_2.txt
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'tis-620' != 'latin1'
- tis-620
+ latin1
 : Expected latin1, but got 'TIS-620' in /home/travis/build/erikrose/chardet/tests/latin1/_ude_4.txt
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'ascii' != 'latin1'
- ascii
+ latin1
 : Expected latin1, but got 'ascii' in /home/travis/build/erikrose/chardet/tests/latin1/_mozilla_bug638318_text.html
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'latin1'
- iso-8859-2
+ latin1
 : Expected latin1, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/latin1/_ude_3.txt
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'ibm855' != 'latin1'
- ibm855
+ latin1
 : Expected latin1, but got 'IBM855' in /home/travis/build/erikrose/chardet/tests/latin1/_ude_1.txt
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'windows-1252'
- iso-8859-2
+ windows-1252
 : Expected windows-1252, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/windows-1252/github_bug_9.txt
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'windows-1252'
- iso-8859-2
+ windows-1252
 : Expected windows-1252, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/windows-1252/_mozilla_bug421271_text.html
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'ibm855' != 'windows-1250'
- ibm855
+ windows-1250
 : Expected windows-1250, but got 'IBM855' in /home/travis/build/erikrose/chardet/tests/windows-1250-hungarian/bbc.co.uk.hu.pressreview.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'windows-1250'
- iso-8859-2
+ windows-1250
 : Expected windows-1250, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/windows-1250-hungarian/bbc.co.uk.hu.learningenglish.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'windows-1255' != 'windows-1250'
- windows-1255
?            ^
+ windows-1250
?            ^
 : Expected windows-1250, but got 'windows-1255' in /home/travis/build/erikrose/chardet/tests/windows-1250-hungarian/bbc.co.uk.hu.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-7' != 'windows-1250'
- iso-8859-7
+ windows-1250
 : Expected windows-1250, but got 'ISO-8859-7' in /home/travis/build/erikrose/chardet/tests/windows-1250-hungarian/objektivhir.hu.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'windows-1250'
- iso-8859-2
+ windows-1250
 : Expected windows-1250, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/windows-1250-hungarian/bbc.co.uk.hu.forum.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'maccyrillic' != 'windows-1256'
- maccyrillic
+ windows-1256
 : Expected windows-1256, but got 'MacCyrillic' in /home/travis/build/erikrose/chardet/tests/windows-1256-arabic/_chromium_windows-1256_with_no_encoding_specified.html
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'windows-1251' != 'iso-8859-2'
- windows-1251
+ iso-8859-2
 : Expected iso-8859-2, but got 'windows-1251' in /home/travis/build/erikrose/chardet/tests/iso-8859-2-hungarian/cigartower.hu.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-7' != 'iso-8859-2'
- iso-8859-7
?          ^
+ iso-8859-2
?          ^
 : Expected iso-8859-2, but got 'ISO-8859-7' in /home/travis/build/erikrose/chardet/tests/iso-8859-2-hungarian/escience.hu.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'koi8-r' != 'iso-8859-2'
- koi8-r
+ iso-8859-2
 : Expected iso-8859-2, but got 'KOI8-R' in /home/travis/build/erikrose/chardet/tests/iso-8859-2-hungarian/shamalt.uw.hu.xml
======================================================================
FAIL: runTest (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 34, in runTest
    self.file_name))
AssertionError: 'iso-8859-2' != 'windows-1254'
- iso-8859-2
+ windows-1254
 : Expected windows-1254, but got 'ISO-8859-2' in /home/travis/build/erikrose/chardet/tests/windows-1254-turkish/_chromium_windows-1254_with_no_encoding_specified.html
----------------------------------------------------------------------
Ran 384 tests in 109.871s
FAILED (failures=27)
@hernantz
Copy link
hernantz commented Sep 9, 2014

+1

@sigmavirus24
Copy link
Member

@hernantz are you volunteering to fix the bugs?

@sigmavirus24
Copy link
Member

We might first benefit from updating our State Machine Models and Probers from upstream. This will require someone who knows C++ and Python and can port the former to the latter.

@dan-blanchard
Copy link
Member Author

Huh, apparently the link I had to the Mozilla upstream was massively out of date. It hadn't shown any updates in the past couple years. Thanks for finding the up-to-date one.

I'm pretty comfortable working with C++, so I'd be able to tackle this. The question is just when. I won't assign myself until I know for sure I have the time to dedicate.

@sigmavirus24
Copy link
Member

I'm pretty comfortable working with C++, so I'd be able to tackle this. The question is just when.

I'm extraordinarily busy. I too am comfortable with C++ but I doubt I'll have time any time soon. I threw this hear in case someone else wants to take a crack at updating chardet. It seems @hernantz wasn't volunteering after all.

@dan-blanchard
Copy link
Member Author

Yeah, I probably won't have time very soon either. I just felt like since this project gets mentioned in Nick Coghlan's great article about multilingual programming, we should probably try to make it work better. :)

@dan-blanchard
Copy link
Member Author

All but one have been fixed via #42.

uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Mar 5, 2016
- Enable "concurrent" Python installation
- Switch to GITHUB for DISTFILES (includes tests)
- Add test target
- Patch setup.py and test.py to support setuptools 'test' command
- Enable NO_ARCH (architecture independent)

[1] chardet/chardet#13

Reviewed by:		rm (maintiner)
Approved by:		rm (maintainer)
Differential Revision:	D5517


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@410159 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Mar 5, 2016
- Enable "concurrent" Python installation
- Switch to GITHUB for DISTFILES (includes tests)
- Add test target
- Patch setup.py and test.py to support setuptools 'test' command
- Enable NO_ARCH (architecture independent)

[1] chardet/chardet#13

Reviewed by:		rm (maintiner)
Approved by:		rm (maintainer)
Differential Revision:	D5517
@dan-blanchard
Copy link
Member Author

We have some known failures right now, but they are not the ones discussed here, so I'm closing this.

eastside pushed a commit to Perkville/chardet that referenced this issue Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants