Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Commit

Permalink
refactor: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Marsmaennchen221 committed May 8, 2024
1 parent 6d897d0 commit 5782725
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/safeds_datasets/image/_mnist/test_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ def test_should_download_and_return_mnist(self) -> None:
assert set(train_output.get_unique_values()) == set(test_output.get_unique_values()) == set(_mnist._mnist._mnist_labels.values())

def test_should_raise_if_file_not_found(self) -> None:
with tempfile.TemporaryDirectory() as tmpdirname:
with pytest.raises(FileNotFoundError):
with tempfile.TemporaryDirectory() as tmpdirname, pytest.raises(FileNotFoundError):
load_mnist(tmpdirname, download=False)


Expand All @@ -47,8 +46,7 @@ def test_should_download_and_return_mnist(self) -> None:
assert set(train_output.get_unique_values()) == set(test_output.get_unique_values()) == set(_mnist._mnist._fashion_mnist_labels.values())

def test_should_raise_if_file_not_found(self) -> None:
with tempfile.TemporaryDirectory() as tmpdirname:
with pytest.raises(FileNotFoundError):
with tempfile.TemporaryDirectory() as tmpdirname, pytest.raises(FileNotFoundError):
load_fashion_mnist(tmpdirname, download=False)


Expand All @@ -69,6 +67,5 @@ def test_should_download_and_return_mnist(self) -> None:
assert set(train_output.get_unique_values()) == set(test_output.get_unique_values()) == set(_mnist._mnist._kuzushiji_mnist_labels.values())

def test_should_raise_if_file_not_found(self) -> None:
with tempfile.TemporaryDirectory() as tmpdirname:
with pytest.raises(FileNotFoundError):
with tempfile.TemporaryDirectory() as tmpdirname, pytest.raises(FileNotFoundError):
load_kmnist(tmpdirname, download=False)

0 comments on commit 5782725

Please sign in to comment.