Skip to content

Commit

Permalink
Make Python algorithms regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Marinovsky committed Jan 5, 2024
1 parent 693cca5 commit 205f47a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Tests/Python/PythonWrapperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using NUnit.Framework;
using Python.Runtime;
using QuantConnect.Python;
using System.Collections.Generic;

namespace QuantConnect.Tests.Python
{
Expand Down Expand Up @@ -59,6 +60,26 @@ public void DoesNotThrowWhenDerivedFromCSharpModel()
}
}

[Test]
public void SettlementModelPythonWrapperWorks()
{
var results = AlgorithmRunner.RunLocalBacktest("CustomSettlementModelRegressionAlgorithm",
new Dictionary<string, string>(),
Language.Python,
AlgorithmStatus.Completed,
algorithmLocation: "../../../Algorithm.Python/CustomSettlementModelRegressionAlgorithm.py");
}

[Test]
public void BenchmarkModelPythonWrapperWorks()
{
var results = AlgorithmRunner.RunLocalBacktest("CustomBenchmarkRegressionAlgorithm",
new Dictionary<string, string> { { "Total Trades", "1" } },
Language.Python,
AlgorithmStatus.Completed,
algorithmLocation: "../../../Algorithm.Python/CustomBenchmarkRegressionAlgorithm.py");
}

private const string FullyImplemented =
@"
from clr import AddReference
Expand Down

0 comments on commit 205f47a

Please sign in to comment.