flake8 tests

This commit is contained in:
shahules786 2022-10-05 20:42:09 +05:30
parent ec76466b00
commit ab0805e1ac
4 changed files with 3 additions and 10 deletions

View File

@ -1,5 +1,3 @@
from asyncio import base_tasks
import pytest
import torch

View File

@ -1,7 +1,6 @@
import pytest
import torch
from enhancer import data
from enhancer.data.dataset import EnhancerDataset
from enhancer.models import Demucs
from enhancer.utils.config import Files
@ -41,4 +40,4 @@ def test_forward(batch_size, samples):
)
def test_demucs_init(dataset, channels, loss):
with torch.no_grad():
model = Demucs(num_channels=channels, dataset=dataset, loss=loss)
_ = Demucs(num_channels=channels, dataset=dataset, loss=loss)

View File

@ -1,7 +1,6 @@
import pytest
import torch
from enhancer import data
from enhancer.data.dataset import EnhancerDataset
from enhancer.models import WaveUnet
from enhancer.utils.config import Files
@ -41,4 +40,4 @@ def test_forward(batch_size, samples):
)
def test_demucs_init(dataset, channels, loss):
with torch.no_grad():
model = WaveUnet(num_channels=channels, dataset=dataset, loss=loss)
_ = WaveUnet(num_channels=channels, dataset=dataset, loss=loss)

View File

@ -1,11 +1,8 @@
from logging import root
import numpy as np
import pytest
import torch
from enhancer.data.fileprocessor import Fileprocessor
from enhancer.utils.config import Files
from enhancer.utils.io import Audio
@ -48,6 +45,6 @@ def test_fileprocessor_names(dataset_name):
def test_fileprocessor_invaliname():
with pytest.raises(ValueError):
fp = Fileprocessor.from_name(
_ = Fileprocessor.from_name(
"undefined", "clean_dir", "noisy_dir", 16000
).prepare_matching_dict()