diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/hello.py b/hello.py index 91e2e77..e40a91f 100644 --- a/hello.py +++ b/hello.py @@ -3,7 +3,7 @@ def HelloWorld(): return def HomePlanet(): - planet = input("What is your home planet? Inster here: ") + planet = input("What is your home planet? Enter here: ") print(planet + ", I heard the weather sucks there.") return diff --git a/test_rigged.py b/test_rigged.py new file mode 100644 index 0000000..43b7c5c --- /dev/null +++ b/test_rigged.py @@ -0,0 +1,16 @@ +from .rigged import Rigged_RNG + + +def test_less_than(monkeypatch): + monkeypatch.setattr("numpy.random.rand", lambda: 0.3) + monkeypatch.setattr("numpy.random.rand", lambda: 0.7) + + result = Rigged_RNG(5, 0.75, 10) + assert result == 5 + +def test_more_than(monkeypatch): + monkeypatch.setattr("numpy.random.rand", lambda: 0.7) + monkeypatch.setattr("numpy.random.rand", lambda: 0.3) + + result = Rigged_RNG(5, 0.75, 10) + assert result == 5 \ No newline at end of file