Commit 004cf80d authored by Bruno Morgado's avatar Bruno Morgado Committed by Bruno S. Morgado
Browse files

Added placeholders, requirements and improved documentation for tests

parent aacd7270
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -11,11 +11,13 @@ How to install
Testing
-------

* **Always** use a virtual environment like `virtualenv` or `anaconda`
* Put tests into the `tests` folder
* Use [PyTest](https://pytest.org) as the testing framework

  - Reference: [PyTest introduction](http://pythontesting.net/framework/pytest/pytest-introduction/)

* Run tests with `python setup.py test`

  - Configure PyTest in `setup.py` and `setup.cfg`
* Running the test creates the `htmlcov` folder
    - Inside this folder a rundown of the issues found will be accessible using the `index.html` file
* All the tests should pass before merging the code 
 
 No newline at end of file
+3 −1
Original line number Diff line number Diff line
@@ -2,3 +2,5 @@ name: ska-skeleton
dependencies:
  - pygments
  - setuptools
  - pytest
  - pytest-cov
 No newline at end of file
+3 −1
Original line number Diff line number Diff line
pygments
setuptools
pytest
pytest-cov
 No newline at end of file
+5 −1
Original line number Diff line number Diff line
# -*- coding: utf-8 -*-


# FIXME: put actual code here
# FIXME: Replace all the following code with the desired functionality for the package
def example():
    pass


def testing_example():
    return 2
+7 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ import pytest
from ska_skeleton import ska_skeleton


# FIXME: Replace all the following examples with tests for the ska_skeleton package code
def test_something():
    assert True

@@ -26,3 +27,9 @@ def an_object():

def test_ska_skeleton(an_object):
    assert an_object == {}


# Test the ska_skeleton package code
def test_package():
    assert ska_skeleton.example() is None
    assert ska_skeleton.testing_example() == 2