Commit e7acd354 authored by Ruben ten Hove's avatar Ruben ten Hove Committed by Federico Falconieri
Browse files

test: add a basic python setup.py project

parent d3f2b441
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
# python project

Mock up python project to be used in testing a setup.py package.
+3 −0
Original line number Diff line number Diff line
"""
Well well, what to write here?
"""
+20 −0
Original line number Diff line number Diff line
"""
This module is quite excellent for any number of testing purposes.
"""


def myfunction(variable: int) -> int:
    """this function is very useful"""
    return variable * 3 + 2


def myotherfunction(variable: int) -> int:
    """this function is even more useful"""
    return variable - 1


def too_complicated() -> None:
    """this function will increase code complexity"""
    for i in range(1000):
        print("was this really necessary??")
    print("I guess it was")
+3 −0
Original line number Diff line number Diff line
from setuptools import setup

setup(name="mypackage", version="1.0.0")
+10 −0
Original line number Diff line number Diff line
"""
I can even make docstrings here! I'm awesome.
"""

from mypackage import mymodule


def test_myfunction():
    """Testing always makes me joyful."""
    assert mymodule.myfunction(variable=3) == 11