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 root_of_unity warning and doctests errors. When mpc version != 1.0.0 #231

Merged
merged 1 commit into from
Mar 21, 2019

Conversation

vinklein
Copy link
Contributor

@vinklein vinklein commented Mar 21, 2019

Currently if gmpy2 is used with a mpc version older than 1.1.0 it generate a compilation warning and doctests failures as gmpy2.root_of_unity attribute is not defined.

Example of doctests failures :
Failed example:
    gmpy2.root_of_unity(1,2)
Exception raised:
    Traceback (most recent call last):
      File "/opt/python/3.5.6/lib/python3.5/doctest.py", line 1321, in __run
        compileflags, 1), test.globs)
      File "<doctest test_mpc.txt[114]>", line 1, in <module>
        gmpy2.root_of_unity(1,2)
    AttributeError: module 'gmpy2' has no attribute 'root_of_unity'

see: https://travis-ci.org/vinklein/gmpy/builds/509298994

  • Fix gmpy2_mpc_misc.h to avoid generating warning
  • Create a doctest flag and a doctest parser to SKIP doctests if root_of_unity is not defined
  • Flag the appropriate doctests

Currently if gmpy2 is used with a mpc version older than
1.1.0 it generate a compilation warning and doctests
failures as gmpy2.root_of_unity attrib is not defined

- Fix gmpy2_mpc_misc.h to avoid generating warning
- Create a doctest flag and a doctest parser
to SKIP doctests if root_of_unity is not defined
@casevh casevh merged commit b739f93 into aleaxit:master Mar 21, 2019
@casevh
Copy link
Collaborator

casevh commented Mar 21, 2019

Thanks!

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.

2 participants