Skip to content

Make test methods public #4532

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

Merged
merged 1 commit into from
Dec 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/Microsoft.ML.Functional.Tests/DataTransformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public DataTransformation(ITestOutputHelper output) : base(output)
/// Extensibility: Add a new column that is a function of other columns.
/// </summary>
[Fact]
void ExtensibilityAddAColumnAsAFunctionOfMultipleColumns()
public void ExtensibilityAddAColumnAsAFunctionOfMultipleColumns()
{
// Concurrency must be 1 to assure that the mapping is done sequentially.
var mlContext = new MLContext(seed: 1);
Expand Down Expand Up @@ -76,7 +76,7 @@ float angiospermCosine(float petalWidth, float petalLength, float sepalWidth, fl
/// Extensibility: Add multiple new columns.
/// </summary>
[Fact]
void ExtensibilityAddingTwoColumns()
public void ExtensibilityAddingTwoColumns()
{
// Concurrency must be 1 to assure that the mapping is done sequentially.
var mlContext = new MLContext(seed: 1);
Expand Down Expand Up @@ -124,7 +124,7 @@ void ExtensibilityAddingTwoColumns()
/// Extensibility: Featurize text using custom word-grams, char-grams, and normalization.
/// </summary>
[Fact]
void ExtensibilityModifyTextFeaturization()
public void ExtensibilityModifyTextFeaturization()
{
// Concurrency must be 1 to assure that the mapping is done sequentially.
var mlContext = new MLContext(seed: 1);
Expand Down Expand Up @@ -160,7 +160,7 @@ void ExtensibilityModifyTextFeaturization()
/// Extensibility: Apply a normalizer to columns in the dataset.
/// </summary>
[Fact]
void ExtensibilityNormalizeColumns()
public void ExtensibilityNormalizeColumns()
{
// Concurrency must be 1 to assure that the mapping is done sequentially.
var mlContext = new MLContext(seed: 1);
Expand Down
2 changes: 1 addition & 1 deletion test/Microsoft.ML.Functional.Tests/Debugging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public Debugging(ITestOutputHelper output) : base(output)
/// float vector {3:1, 25:1, 203:1, 511:1}, etc. etc.
/// </remarks>
[Fact]
void InspectIntermediatePipelineSteps()
public void InspectIntermediatePipelineSteps()
{
var mlContext = new MLContext(seed: 1);

Expand Down
4 changes: 2 additions & 2 deletions test/Microsoft.ML.Functional.Tests/IntrospectiveTraining.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void InspectFastTreeModelParameters()
/// Introspective Training: GAM Shape Functions are easily accessed.
/// </summary>
[Fact]
void IntrospectGamShapeFunctions()
public void IntrospectGamShapeFunctions()
{
// Concurrency must be 1 to assure that the mapping is done sequentially.
var mlContext = new MLContext(seed: 1);
Expand Down Expand Up @@ -240,7 +240,7 @@ public void InpsectLinearModelParameters()
/// Introspectable Training: Parameters of a trained Normalizer are easily accessed.
/// </summary>
[Fact]
void IntrospectNormalization()
public void IntrospectNormalization()
{
// Concurrency must be 1 to assure that the mapping is done sequentially.
var mlContext = new MLContext(seed: 1);
Expand Down
2 changes: 1 addition & 1 deletion test/Microsoft.ML.Functional.Tests/Validation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public Validation(ITestOutputHelper output) : base(output)
/// metrics, trained pipelines, and scored test data for each fold.
/// </summary>
[Fact]
void CrossValidation()
public void CrossValidation()
{
var mlContext = new MLContext(seed: 1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public DnnImageFeaturizerTests(ITestOutputHelper helper) : base(helper)
}

[OnnxFact]
void TestDnnImageFeaturizer()
public void TestDnnImageFeaturizer()
{
var samplevector = GetSampleArrayData();

Expand Down
8 changes: 4 additions & 4 deletions test/Microsoft.ML.OnnxTransformerTest/OnnxTransformTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public OnnxTransformTests(ITestOutputHelper output) : base(output)
}

[OnnxFact]
void TestSimpleCase()
public void TestSimpleCase()
{
var modelFile = "squeezenet/00000001/model.onnx";
var samplevector = GetSampleArrayData();
Expand Down Expand Up @@ -144,7 +144,7 @@ void TestSimpleCase()
[OnnxTheory]
[InlineData(null, false)]
[InlineData(null, true)]
void TestOldSavingAndLoading(int? gpuDeviceId, bool fallbackToCpu)
public void TestOldSavingAndLoading(int? gpuDeviceId, bool fallbackToCpu)
{
var modelFile = "squeezenet/00000001/model.onnx";
var samplevector = GetSampleArrayData();
Expand Down Expand Up @@ -240,14 +240,14 @@ public void OnnxWorkout()
}

[OnnxFact]
void TestCommandLine()
public void TestCommandLine()
{
var x = Maml.Main(new[] { @"showschema loader=Text{col=data_0:R4:0-150527} xf=Onnx{InputColumns={data_0} OutputColumns={softmaxout_1} model={squeezenet/00000001/model.onnx}}" });
Assert.Equal(0, x);
}

[OnnxFact]
void TestCommandLineWithCustomShape()
public void TestCommandLineWithCustomShape()
{
var x = Maml.Main(new[] { @"showschema loader=Text{col=data_0:R4:0-150527} xf=Onnx{customShapeInfos={Name=data_0 Shape=1 Shape=3 Shape=224 Shape=224} InputColumns={data_0} OutputColumns={softmaxout_1} model={squeezenet/00000001/model.onnx}}" });
Assert.Equal(0, x);
Expand Down
2 changes: 1 addition & 1 deletion test/Microsoft.ML.Tests/FakeSchemaTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public FakeSchemaTest(ITestOutputHelper output)
}

[Fact]
void SimpleTest()
public void SimpleTest()
{
var metadataBuilder = new DataViewSchema.Annotations.Builder();
metadataBuilder.Add("M", NumberDataViewType.Single, (ref float v) => v = 484f);
Expand Down
18 changes: 9 additions & 9 deletions test/Microsoft.ML.Tests/OnnxConversionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ private class DataPoint
}

[Fact]
void LpNormOnnxConversionTest()
public void LpNormOnnxConversionTest()
{
var mlContext = new MLContext(seed: 1);

Expand Down Expand Up @@ -369,7 +369,7 @@ void LpNormOnnxConversionTest()
}

[Fact]
void CommandLineOnnxConversionTest()
public void CommandLineOnnxConversionTest()
{
string dataPath = GetDataPath("breast-cancer.txt");
string modelPath = GetOutputPath("ModelWithLessIO.zip");
Expand Down Expand Up @@ -918,7 +918,7 @@ public bool Equals(TransformedDataPoint other)
}

[Fact]
void IndicateMissingValuesOnnxConversionTest()
public void IndicateMissingValuesOnnxConversionTest()
{
var mlContext = new MLContext(seed: 1);

Expand Down Expand Up @@ -968,7 +968,7 @@ void IndicateMissingValuesOnnxConversionTest()
}

[Fact]
void ValueToKeyMappingOnnxConversionTest()
public void ValueToKeyMappingOnnxConversionTest()
{
var mlContext = new MLContext(seed: 1);
string filePath = GetDataPath("type-conversion.txt");
Expand Down Expand Up @@ -1018,7 +1018,7 @@ private class TextData
}

[Fact]
void WordTokenizerOnnxConversionTest()
public void WordTokenizerOnnxConversionTest()
{
var mlContext = new MLContext(seed: 1);

Expand Down Expand Up @@ -1055,7 +1055,7 @@ void WordTokenizerOnnxConversionTest()
}

[Fact]
void NgramOnnxConnversionTest()
public void NgramOnnxConnversionTest()
{
var mlContext = new MLContext(seed: 1);

Expand Down Expand Up @@ -1171,7 +1171,7 @@ public void OptionalColumnOnnxTest()
}

[Fact]
private void KeyToValueOnnxConversionTest()
public void KeyToValueOnnxConversionTest()
{
var mlContext = new MLContext(seed: 1);

Expand Down Expand Up @@ -1207,7 +1207,7 @@ private void KeyToValueOnnxConversionTest()
}

[Fact]
void MulticlassTrainersOnnxConversionTest()
public void MulticlassTrainersOnnxConversionTest()
{
var mlContext = new MLContext(seed: 1);

Expand Down Expand Up @@ -1262,7 +1262,7 @@ void MulticlassTrainersOnnxConversionTest()
}

[Fact]
void CopyColumnsOnnxTest()
public void CopyColumnsOnnxTest()
{
var mlContext = new MLContext(seed: 1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public partial class ApiScenariosTests
/// say, injecting a dummy label.
/// </summary>
[Fact]
void DecomposableTrainAndPredict()
public void DecomposableTrainAndPredict()
{
var dataPath = GetDataPath(TestDatasets.irisData.trainFilename);
var ml = new MLContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public partial class ApiScenariosTests
/// usage of already established components), but should still be possible.
/// </summary>
[Fact]
void Extensibility()
public void Extensibility()
{
var dataPath = GetDataPath(TestDatasets.irisData.trainFilename);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public partial class ApiScenariosTests
/// and performant in the new API.
/// </summary>
[Fact]
void MultithreadedPrediction()
public void MultithreadedPrediction()
{
var ml = new MLContext(seed: 1);
var data = ml.Data.LoadFromTextFile<SentimentData>(GetDataPath(TestDatasets.Sentiment.trainFilename), hasHeader: true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public partial class ApiScenariosTests
/// key value to original label value. This example also shows how to convert key value to original label.
/// </summary>
[Fact]
void PredictAndMetadata()
public void PredictAndMetadata()
{
var dataPath = GetDataPath(TestDatasets.irisData.trainFilename);
var ml = new MLContext();
Expand Down Expand Up @@ -70,7 +70,7 @@ void PredictAndMetadata()
}

[Fact]
void MulticlassConfusionMatrixSlotNames()
public void MulticlassConfusionMatrixSlotNames()
{
var mlContext = new MLContext(seed: 1);

Expand Down
6 changes: 3 additions & 3 deletions test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public TensorFlowEstimatorTests(ITestOutputHelper output) : base(output)
}

[TensorFlowFact]
void TestSimpleCase()
public void TestSimpleCase()
{
var modelFile = "model_matmul/frozen_saved_model.pb";

Expand Down Expand Up @@ -97,7 +97,7 @@ void TestSimpleCase()
}

[TensorFlowFact]
void TestOldSavingAndLoading()
public void TestOldSavingAndLoading()
{
var modelFile = "model_matmul/frozen_saved_model.pb";

Expand Down Expand Up @@ -133,7 +133,7 @@ void TestOldSavingAndLoading()
}

[TensorFlowFact]
void TestCommandLine()
public void TestCommandLine()
{
// typeof helps to load the TensorFlowTransformer type.
Type type = typeof(TensorFlowTransformer);
Expand Down
10 changes: 5 additions & 5 deletions test/Microsoft.ML.Tests/TermEstimatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class TestMetaClass
}

[Fact]
void TestDifferentTypes()
public void TestDifferentTypes()
{
string dataPath = GetDataPath("adult.tiny.with-schema.txt");

Expand Down Expand Up @@ -92,7 +92,7 @@ void TestDifferentTypes()
}

[Fact]
void TestSimpleCase()
public void TestSimpleCase()
{
var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } };

Expand All @@ -110,7 +110,7 @@ void TestSimpleCase()
}

[Fact]
void TestOldSavingAndLoading()
public void TestOldSavingAndLoading()
{
var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } };
var dataView = ML.Data.LoadFromEnumerable(data);
Expand All @@ -132,7 +132,7 @@ void TestOldSavingAndLoading()
}

[Fact]
void TestMetadataCopy()
public void TestMetadataCopy()
{
var data = new[] { new TestMetaClass() { Term = "A", NotUsed = 1 }, new TestMetaClass() { Term = "B" }, new TestMetaClass() { Term = "C" } };
var dataView = ML.Data.LoadFromEnumerable(data);
Expand All @@ -150,7 +150,7 @@ void TestMetadataCopy()
}

[Fact]
void TestCommandLine()
public void TestCommandLine()
{
Assert.Equal(0, Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0} xf=Term{col=B:A} in=f:\2.txt" }));
}
Expand Down
4 changes: 2 additions & 2 deletions test/Microsoft.ML.Tests/Transformers/ConcatTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public ConcatTests(ITestOutputHelper output) : base(output)
}

[Fact]
void TestConcatNoInputColumns()
public void TestConcatNoInputColumns()
{
var thrown = false;

Expand All @@ -38,7 +38,7 @@ void TestConcatNoInputColumns()
}

[Fact]
void TestConcat()
public void TestConcat()
{
string dataPath = GetDataPath("adult.tiny.with-schema.txt");

Expand Down
Loading