aboutsummaryrefslogtreecommitdiff
path: root/tests/test_file_class.py
diff options
context:
space:
mode:
authorCody Logan <cody@lokken.dev>2023-11-01 11:33:13 -0700
committerCody Logan <cody@lokken.dev>2023-11-01 11:42:43 -0700
commitf61853c366a1554f545b34783e1aa282022598b9 (patch)
treec0b5bd30f23183cd81f67622c3534e0ee5417bee /tests/test_file_class.py
parent8b923f0cee8fed90d6eef313429eb593877e0f2d (diff)
downloadwikiget-f61853c366a1554f545b34783e1aa282022598b9.tar.gz
wikiget-f61853c366a1554f545b34783e1aa282022598b9.zip
Add some explanatory comments to tests
Diffstat (limited to 'tests/test_file_class.py')
-rw-r--r--tests/test_file_class.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_file_class.py b/tests/test_file_class.py
index 1b76566..b935efc 100644
--- a/tests/test_file_class.py
+++ b/tests/test_file_class.py
@@ -24,6 +24,10 @@ from wikiget.file import File
class TestFileClass:
@pytest.fixture(scope="class")
def file_with_name(self) -> File:
+ """
+ A File object created with only a name should set its destination property to
+ the same value and its site property to the program's default site.
+ """
return File("foobar.jpg")
def test_file_with_name(self, file_with_name: File) -> None:
@@ -37,6 +41,10 @@ class TestFileClass:
@pytest.fixture(scope="class")
def file_with_name_and_dest(self) -> File:
+ """
+ A File object created with a name and destination should set those properties
+ accordingly; they should not be the same value.
+ """
return File("foobar.jpg", dest="bazqux.jpg")
def test_file_with_name_and_dest(self, file_with_name_and_dest: File) -> None:
@@ -46,5 +54,9 @@ class TestFileClass:
assert file_with_name_and_dest.dest != file_with_name_and_dest.name
def test_file_with_name_and_site(self) -> None:
+ """
+ A File object created with a name and site should set those properties
+ accordingly and not use the program's default site.
+ """
file = File("foobar.jpg", site="en.wikipedia.org")
assert file.site == "en.wikipedia.org"