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

Doctests of Autocorrelation.py are broken #2

Open
MartinThoma opened this issue Mar 10, 2020 · 0 comments
Open

Doctests of Autocorrelation.py are broken #2

MartinThoma opened this issue Mar 10, 2020 · 0 comments

Comments

@MartinThoma
Copy link
Owner

How to reproduce

pytest --doctest-modules propy/Autocorrelation.py

Errors

_____________________________________________________________________________________________________ [doctest] propy.Autocorrelation.CalculateGearyAuto _____________________________________________________________________________________________________
383     -------
384     result contains 30*p Geary autocorrelation descriptors based on the given
385     properties.
386 
387     Examples
388     --------
389     >>> from propy.GetProteinFromUniprot import GetProteinSequence
390     >>> protein = GetProteinSequence(ProteinID="Q9NQ39")
391     >>> AAP, AAPName = _Hydrophobicity, "_Hydrophobicity"
392     >>> result = CalculateGearyAuto(protein, AAP, AAPName)
UNEXPECTED EXCEPTION: KeyError(0)
Traceback (most recent call last):

  File "/home/moose/.pyenv/versions/3.8.1/lib/python3.8/doctest.py", line 1329, in __run
    exec(compile(example.source, filename, "single",

  File "<doctest propy.Autocorrelation.CalculateGearyAuto[3]>", line 1, in <module>

  File "/home/moose/GitHub/propy3/propy/Autocorrelation.py", line 397, in CalculateGearyAuto
    ProteinSequence, AAProperty[i], AAPropertyName[i]

KeyError: 0

/home/moose/GitHub/propy3/propy/Autocorrelation.py:392: UnexpectedException
_____________________________________________________________________________________________________ [doctest] propy.Autocorrelation.CalculateMoranAuto _____________________________________________________________________________________________________
348     -------
349     result contains 30*p Moran autocorrelation descriptors based on the given
350     properties.
351 
352     Examples
353     --------
354     >>> from propy.GetProteinFromUniprot import GetProteinSequence
355     >>> protein = GetProteinSequence(ProteinID="Q9NQ39")
356     >>> AAP, AAPName = _Hydrophobicity, "_Hydrophobicity"
357     >>> result = CalculateMoranAuto(protein, AAP, AAPName)
UNEXPECTED EXCEPTION: KeyError(0)
Traceback (most recent call last):

  File "/home/moose/.pyenv/versions/3.8.1/lib/python3.8/doctest.py", line 1329, in __run
    exec(compile(example.source, filename, "single",

  File "<doctest propy.Autocorrelation.CalculateMoranAuto[3]>", line 1, in <module>

  File "/home/moose/GitHub/propy3/propy/Autocorrelation.py", line 362, in CalculateMoranAuto
    ProteinSequence, AAProperty[i], AAPropertyName[i]

KeyError: 0

/home/moose/GitHub/propy3/propy/Autocorrelation.py:357: UnexpectedException
_____________________________________________________________________________________________ [doctest] propy.Autocorrelation.CalculateNormalizedMoreauBrotoAuto _____________________________________________________________________________________________
314     -------
315     result contains 30*p Normalized Moreau-Broto autocorrelation descriptors
316     based on the given properties.
317 
318     Examples
319     --------
320     >>> from propy.GetProteinFromUniprot import GetProteinSequence
321     >>> protein = GetProteinSequence(ProteinID="Q9NQ39")
322     >>> AAP, AAPName = _Hydrophobicity, "_Hydrophobicity"
323     >>> result = CalculateNormalizedMoreauBrotoAuto(protein, AAP, AAPName)
UNEXPECTED EXCEPTION: KeyError(0)
Traceback (most recent call last):

  File "/home/moose/.pyenv/versions/3.8.1/lib/python3.8/doctest.py", line 1329, in __run
    exec(compile(example.source, filename, "single",

  File "<doctest propy.Autocorrelation.CalculateNormalizedMoreauBrotoAuto[3]>", line 1, in <module>

  File "/home/moose/GitHub/propy3/propy/Autocorrelation.py", line 328, in CalculateNormalizedMoreauBrotoAuto
    ProteinSequence, AAProperty[i], AAPropertyName[i]

KeyError: 0

/home/moose/GitHub/propy3/propy/Autocorrelation.py:323: UnexpectedException

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

No branches or pull requests

1 participant