Skip to content

Commit

Permalink
Update TextLoaderTests.cs
Browse files Browse the repository at this point in the history
The constructor should throw an exception when trying to load from a fake/missing file.
  • Loading branch information
mstfbl committed Jan 28, 2020
1 parent cf4a1fe commit 9216110
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions test/Microsoft.ML.Tests/TextLoaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,6 @@ public TextLoaderTests(ITestOutputHelper output)
env = new ConsoleEnvironment(42).AddStandardComponents();
}

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

Assert.NotNull(mlContext.Data.LoadFromTextFile<Input>("fakeFile.txt"));
Assert.NotNull(mlContext.Data.LoadFromTextFile<Input>("fakeFile.txt", hasHeader: true));
Assert.NotNull(mlContext.Data.LoadFromTextFile<Input>("fakeFile.txt", hasHeader: false));
Assert.NotNull(mlContext.Data.LoadFromTextFile<Input>("fakeFile.txt", hasHeader: false, trimWhitespace: false, allowSparse: false));
Assert.NotNull(mlContext.Data.LoadFromTextFile<Input>("fakeFile.txt", hasHeader: false, allowSparse: false));
Assert.NotNull(mlContext.Data.LoadFromTextFile<Input>("fakeFile.txt", hasHeader: false, allowQuoting: false));
Assert.NotNull(mlContext.Data.LoadFromTextFile<InputWithUnderscore>("fakeFile.txt"));
}

[Fact]
public void CanSuccessfullyApplyATransform()
{
Expand Down

0 comments on commit 9216110

Please sign in to comment.