selik / xport

Python reader and writer for SAS XPORT data transport files.
MIT License
49 stars 24 forks source link

Add test data dir with file to pass doctests #63

Closed dcroote closed 3 years ago

dcroote commented 3 years ago

Currently, running pytest results in doctest failures in the load, loads, dump, and dumps functions of xport/src/xport/v56.py because of either the missing example.xpt file or absence of the test/data directory.

This PR adds the directory and example file so all tests pass. However, the tests currently pass only with pandas<=1.0.5.

https://github.com/selik/xport/blob/6f06128e05f83aea546bde708f69ed83fc6c78cc/src/xport/v56.py#L891-L953

selik commented 3 years ago

Thanks, this looks great!

Did you accidentally leave in a git ignore for doctest.xpt or was that intentional?

dcroote commented 3 years ago

It was intentional since running pytest produces that file and I figured it would be easiest to avoid having it show up as changed in future PRs as people run the tests. Up to you though!

selik commented 3 years ago

Sounds good. I'd forgotten about that.