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

Fixes doctest for python3 #1310

Merged
merged 1 commit into from
Feb 27, 2016
Merged

Fixes doctest for python3 #1310

merged 1 commit into from
Feb 27, 2016

Conversation

alvations
Copy link
Contributor

Dictionary hash are dynamic in Python3 so the repr output will be different all the time. Doctest should check for value equality instead. Monotonic nested defaultdict/dictionary outputs should not be affected though.

Fixes issue on https://nltk.ci.cloudbees.com/job/nltk/TOXENV=py34-jenkins,jdk=jdk8latestOnlineInstall/lastCompletedBuild/testReport/nltk.util/Trie/as_dict/ and https://nltk.ci.cloudbees.com/job/nltk/TOXENV=py33-jenkins,jdk=jdk8latestOnlineInstall/lastCompletedBuild/testReport/

(Same issue as a488bb6)

@stevenbird Sorry I pressed the wrong radio button in the previous commit when fixing a488bb6

Dictionary hash are dynamic in Python3 so the __repr__ output will be different all the time. Doctest should check for value equality instead. Monotonic nested defaultdict/dictionary outputs should not be affected though.

Fixes issue on https://nltk.ci.cloudbees.com/job/nltk/TOXENV=py34-jenkins,jdk=jdk8latestOnlineInstall/lastCompletedBuild/testReport/nltk.util/Trie/as_dict/

(Same issue as a488bb6)

@stevenbird Sorry I presented the wrong radio button in the previous commit when fixing a488bb6
@stevenbird
Copy link
Member

Great, thanks @alvations

stevenbird added a commit that referenced this pull request Feb 27, 2016
@stevenbird stevenbird merged commit f05bea2 into develop Feb 27, 2016
@alvations alvations deleted the alvations-patch-doctests branch February 27, 2016 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants