Skip to content

Conversation

eddieantonio
Copy link
Contributor

@eddieantonio eddieantonio commented Aug 31, 2018

Let me know if there's a way I can add automated tests for this module!

Here's a simple test for this function:

from unicodedata import normalize

# '\u00e8' == 'é'
# '\u0301' == 'e' + '\N{COMBINING ACUTE ACCENT}'
assert normalize('NFC', '\u00e9') == normalize('NFC', 'e\u0301'))

Addresses #547

@eddieantonio eddieantonio changed the title Add unicodedata.normalize() [WIP] Add unicodedata.normalize() Aug 31, 2018
@eddieantonio
Copy link
Contributor Author

I'll whip up an autotest before this should be merged. Please let me know of any other things I should be aware of before this should be merged.

@JdeH
Copy link
Collaborator

JdeH commented Aug 31, 2018

Thanks for this speedy contribution!

Currently Travis CI isn't up to par with Transcrypt. This will be a while, since the one who made the CI work currently isn't available, and I'm not exactly a Travis expert...

But you can run the autotests off-line. To add an autotest for this module, add a testlet to ../Transcrypt/transcrypt/development/automated_tests/transcrypt. Also at an import and an autotester.run call to autotest.py. The principle of the autotest system is described at:

http://www.transcrypt.org/docs/html/autotesting_transcrypt.html

Due to the transition of TS 3.6 to TS 3.7 the documentation on autotesting may still lag back on some points. If so let me know so it can be updated. You should also be able to run the shipment test but it requires node.js' http-server to be installed (as the Python http server has some problems).

@JdeH
Copy link
Collaborator

JdeH commented Aug 31, 2018

As you have contributed a new file, it can't break anything, so I'll already merge this in the master branch. Note that 3.7 is still on the modules branch. So it's not yet in 3.7. Will be no big effort to merge it manually. Currently a minor reorganisation of the branching model is underway.

@JdeH JdeH merged commit 7efbc7d into TranscryptOrg:master Aug 31, 2018
@JdeH
Copy link
Collaborator

JdeH commented Aug 31, 2018

I don't think there are other things you should be aware of.
I hope this module will grow according to the needs of people.

@JdeH
Copy link
Collaborator

JdeH commented Sep 3, 2018

I've also manually drawn this into 3.7.4
Are you still planning to add an autotest?

@eddieantonio
Copy link
Contributor Author

Yes! I'll whip up a PR within the next two days.

@JdeH
Copy link
Collaborator

JdeH commented Sep 3, 2018

Thanks! And no hurry...
By the way: as you will have noticed 3.7.4 is now on the master branch.

@eddieantonio eddieantonio deleted the feature/gh-547-add-unicodedata-normalize branch September 4, 2018 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants