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

Refactor/doc tests #44

Merged
merged 32 commits into from
Sep 18, 2019
Merged

Conversation

neomonkeus
Copy link
Member

@niftools/pyffi-reviewer

Overview

Convert remaining text based doctests to run using nose.

Fixes Known Issues

N\A

Documentation

Covered by existing documentation

Testing

All existing test cases passing

Manual

N\A pure automation

Automated

Full regression suite passing

Additional Information

@coveralls
Copy link

coveralls commented Jan 2, 2018

Coverage Status

Coverage decreased (-0.4%) to 57.881% when pulling b8d7ea3 on neomonkeus:refactor/doc_tests into f2789ea on niftools:develop.

@neomonkeus
Copy link
Member Author

Travis automation has picked up issues with python 3.7 and some generator functions.
Need to investigate if there is a backwards compatible update that will support 3.4 - 3.7

@TagnumElite
Copy link
Member

TagnumElite commented May 16, 2019

I figured out the problem, my solution was this. Or surround the next() with try-catch StopIteration clause

Example:

def get_triangles(self):
    """Generator for all triangles."""
        if self.faces: ...
        elif self.indices_data:
        it = iter(self.indices_data.indices)
        try:
            while True:
                yield next(it), next(it), next(it)
        except StopIteration:
            pass

neomonkeus and others added 5 commits May 27, 2019 11:31
Fixes skinning for Wildlife Park 2&3 - would scale mesh to zero. Could wrap the actual skinning in a helper function to re-use code and save some lines.
Had no attribute sub_constraint, causing import to fail due to apply_scale() being called on it.
Not tested because I didn't find one in the wild, but it has the exact same pattern found in bhkLimitedHingeConstraint, and no sub_constraint attribute is noted in the nif.xml, but the corrected ones are.
Essential PyFFI fixes for NIF import
@neomonkeus neomonkeus merged commit 440c61c into niftools:develop Sep 18, 2019
@neomonkeus neomonkeus deleted the refactor/doc_tests branch September 18, 2019 09:41
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.

4 participants