Skip to content

Commit dd5b2ff

Browse files
committed
Add function name pattern for pytest and align tests
1 parent 1b8c523 commit dd5b2ff

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

Tests/test_mnist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def calibrate_model(
131131
model(images)
132132

133133

134-
def test_mnist_quant_export() -> None:
134+
def deepQuantTestMnistQuantExport() -> None:
135135
"""Main execution function."""
136136

137137
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")

Tests/test_resnet18.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def prepare_resnet18_model() -> nn.Module:
115115
return quantized_resnet
116116

117117

118-
def test_resnet18_quant_export() -> None:
118+
def deepQuantTestResnet18QuantExport() -> None:
119119
"""
120120
Test function for exporting a quantized ResNet18 using BrevitasExporter.
121121
Validates the export process by running exportBrevitas and printing the FX graph.

Tests/test_simple_cnn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
112112
return x
113113

114114

115-
def test_simple_quant_cnn() -> None:
115+
def deepQuantTestSimpleQuantCNN() -> None:
116116
"""
117117
Test function for the SimpleQuantCNN using exportBrevitas.
118118
Ensures both the forward pass and the FX tracing work properly.

Tests/test_simple_mha.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def forward(self, x: Tensor) -> Tensor:
7272
return out
7373

7474

75-
def test_simple_quant_mha() -> None:
75+
def deepQuantTestSimpleQuantMHA() -> None:
7676
"""
7777
Test function for the SimpleQuantMHA using exportBrevitas.
7878
Verifies both the forward pass and the export tracing.

Tests/test_simple_nn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
9494
return x
9595

9696

97-
def test_simple_quant_nn() -> None:
97+
def deepQuantTestSimpleQuantNN() -> None:
9898
"""
9999
Test function for the SimpleQuantNN using exportBrevitas.
100100
Tests both the model's functionality and the export process.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ dependencies = [
3939
packages = ["DeepQuant"]
4040

4141
[tool.pytest.ini_options]
42+
python_functions = ["deepQuantTest*"]
4243
filterwarnings = [
4344
"ignore::DeprecationWarning",
4445
"ignore::UserWarning"

0 commit comments

Comments
 (0)