-
Notifications
You must be signed in to change notification settings - Fork 14
Meg interest calculator #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
0f986d3
7b10927
5a4bf0e
14415f8
088a7ec
ed6c538
f96b6fd
43970ee
1c87074
84dc20c
0904f0f
8c548f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| """Say Hello.""" | ||
| output = Element("output") | ||
| output = Element("output") #type: ignore | ||
| output.write("From Python...") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,13 +11,16 @@ | |
| from psc.fixtures import DummyRequest | ||
| from psc.fixtures import DummyResponse | ||
| from psc.fixtures import DummyRoute | ||
| from psc.fixtures import FakeDocument | ||
| from psc.fixtures import MockTestClient | ||
| from psc.fixtures import PageT | ||
| from psc.fixtures import mocked_client_page | ||
| from psc.fixtures import route_handler | ||
| from psc.here import STATIC | ||
|
|
||
|
|
||
| Element = cast("Unknown", "Element") | ||
|
|
||
| def test_test_client(test_client: TestClient) -> None: | ||
| """Ensure fixture returns an initialized TestClient.""" | ||
| assert test_client.app | ||
|
|
@@ -138,32 +141,32 @@ def test_route_handler_fake_bad_path() -> None: | |
| def test_fake_element_not_installed() -> None: | ||
| """We don't request the fixture so it isn't available.""" | ||
| with pytest.raises(NameError): | ||
| Element # noqa | ||
| Element # noqa | ||
|
|
||
|
|
||
| def test_fake_element_installed(fake_element) -> None: | ||
| def test_fake_element_installed(fake_element: function) -> None: | ||
|
||
| """Element is available as ``fake_element`` installed it.""" | ||
| Element # noqa | ||
| Element # noqa | ||
|
|
||
|
|
||
| def test_fake_element_find_element(fake_document, fake_element) -> None: | ||
| def test_fake_element_find_element(fake_document: FakeDocument, fake_element: function) -> None: | ||
|
||
| """The Element can get a value from the fake document.""" | ||
| fake_document.values["btn1"] = "value1" | ||
| button = Element("btn1") # noqa | ||
| assert button.value == "value1" | ||
|
|
||
|
|
||
| def test_fake_element_write(fake_document, fake_element) -> None: | ||
| def test_fake_element_write(fake_document: FakeDocument, fake_element: function) -> None: | ||
| """The Element can write a value that is captured.""" | ||
| fake_document.values["btn1"] = "value1" | ||
| button = Element("btn1") # noqa | ||
| button = Element("btn1") # noqa | ||
| button.write("Some Value") | ||
| assert fake_document.log[0] == "Some Value" | ||
|
|
||
|
|
||
| def test_fake_element_remove_attribute(fake_document, fake_element) -> None: | ||
| def test_fake_element_remove_attribute(fake_document: FakeDocument, fake_element: function) -> None: | ||
| """The Element can pretend to remove an attribute.""" | ||
| fake_document.values["btn1"] = "value1" | ||
| button = Element("btn1") # noqa | ||
| button = Element("btn1") # noqa | ||
| button.removeAttribute("disabled") | ||
| assert fake_document.log == [] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of this line causes some tests to fail, as
Elementshould only exist in tests that ask for thefake_elementfixture.