mnooner256 / pyqrcode

Python 3 module to generate QR Codes
BSD 3-Clause "New" or "Revised" License
408 stars 75 forks source link

Kanji tests and fixed detection #33

Closed heuer closed 9 years ago

heuer commented 9 years ago

BTW, "QuickMark" can handle Kanji

mnooner256 commented 9 years ago

I think in test_kanji_enforce_binary there is a misunderstanding for test 2. According to the standard, the smallest possible mode should always be chosen. In other words, if it is possible to store 16 bits as 13 bits, then the mode should be kanji. The encoding parameter should specify what encoding the contents are in, not what they will become. I adjusted this test to use the mode parameter to force binary. Basically, testing that overriding the guessed content type works.

Still looking at the other tests...

mnooner256 commented 9 years ago

I believe I fixed everything. All the tests pass.