Loading ska_python_skeleton/main.py→ska_python_skeleton/ska_python_skeleton.py +5 −3 Original line number Diff line number Diff line Loading @@ -9,12 +9,14 @@ def function_example(): # TODO: Replace all the following code with the desired functionality for the package class SKA(): """Define class and it's attributes""" class SKA: """Define class, methods etc""" something = 0 def example(self): """Example: Define non return function for subsequent test.""" def testing_example(self): def example_2(self): """Example: Define function for subsequent test with specific return value.""" return 2 tests/test_ska_skeleton.py +5 −3 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ """Tests for the ska_python_skeleton module.""" import pytest from ska_python_skeleton import main from ska_python_skeleton import ska_python_skeleton # TODO: Replace all the following examples with tests for the ska_python_skeleton package code Loading Loading @@ -34,5 +34,7 @@ def test_ska_python_skeleton(an_object): def test_package(): """Example: Assert the ska_python_skeleton package code.""" assert main.example() is None assert main.testing_example() == 2 assert ska_python_skeleton.function_example() is None foo = ska_python_skeleton.SKA() assert foo.example_2() == 2 assert foo.example() is None Loading
ska_python_skeleton/main.py→ska_python_skeleton/ska_python_skeleton.py +5 −3 Original line number Diff line number Diff line Loading @@ -9,12 +9,14 @@ def function_example(): # TODO: Replace all the following code with the desired functionality for the package class SKA(): """Define class and it's attributes""" class SKA: """Define class, methods etc""" something = 0 def example(self): """Example: Define non return function for subsequent test.""" def testing_example(self): def example_2(self): """Example: Define function for subsequent test with specific return value.""" return 2
tests/test_ska_skeleton.py +5 −3 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ """Tests for the ska_python_skeleton module.""" import pytest from ska_python_skeleton import main from ska_python_skeleton import ska_python_skeleton # TODO: Replace all the following examples with tests for the ska_python_skeleton package code Loading Loading @@ -34,5 +34,7 @@ def test_ska_python_skeleton(an_object): def test_package(): """Example: Assert the ska_python_skeleton package code.""" assert main.example() is None assert main.testing_example() == 2 assert ska_python_skeleton.function_example() is None foo = ska_python_skeleton.SKA() assert foo.example_2() == 2 assert foo.example() is None