Skip to content

Automated testing #67

@abdulhaq-e

Description

@abdulhaq-e

I have made a pull request #66 in which I included automated testing. This will hopefully satisfy the requirement for the v2.0 roadmap #40. A few notes regarding the PR:

1- I have used pytest as the test tool. It's better imo than Django Testing. The original tests have not been touched as py.test is compatible with them. Nonetheless, if you don't like it, automation can be done without it and I can edit the PR (see the examples on the pytest website)

2- pytest is able to generate a runtests script which I did, so python runtests.py would run the tests without the user invoking py.test manually.

3- Tox has been used to test different environments. It's a great tool for such purposes and it goes well with pytest but it's not a necessary. (see docs).

Now this is the worse part:

4- If we're to test a combination of python2.7, python3.2, python3.3, python3.4, django1.6, django1.7, django1.8, drf2.4, drf3.0, drf3.1, drf3.2 Then only a handful of these tests will pass. Anything other than python{27,33,34}, django18, drf{31,32} will FAIL. I had a quick look at the failures, some of them are easy to fix and some are not. However, I didn't fix anything in order to follow a branch per feature process.

Finally, thanks to drf-json-api as I got the idea for automated testing from it. That project is identical to this but this is more mature and active and the code is quite clean (despite the fact that the above tests all work in drf-json-api excluding drf2.4) . Sad fragmentation in OSS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions