Skip to content

Commit

Permalink
Minor fixes (#7980)
Browse files Browse the repository at this point in the history
- Minor test improvement
- Adjust DownloaderDataProvider to follow the pattern
  • Loading branch information
Martin-Molinero committed Apr 26, 2024
1 parent cce8945 commit b527a3d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
Expand Up @@ -32,17 +32,19 @@
<ItemGroup>
<Compile Include="..\Common\Properties\SharedAssemblyInfo.cs" Link="Properties\SharedAssemblyInfo.cs" />
</ItemGroup>

<ItemGroup>
<None Include="..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="config.example.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\QuantConnect.csproj" />
<ProjectReference Include="..\Configuration\QuantConnect.Configuration.csproj" />
<ProjectReference Include="..\Engine\QuantConnect.Lean.Engine.csproj" />
<ProjectReference Include="..\Logging\QuantConnect.Logging.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="config.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
Expand Up @@ -8,7 +8,7 @@
"data-folder": "../../../Data/",

// To get your api access token go to quantconnect.com/account
"job-user-id": "",
"job-user-id": "0",
"api-access-token": "",
"job-organization-id": "",

Expand Down
9 changes: 9 additions & 0 deletions Tests/AssemblyInitialize.cs
Expand Up @@ -23,6 +23,7 @@
using QuantConnect.Data;
using QuantConnect.Data.Custom.IconicTypes;
using QuantConnect.Data.Market;
using QuantConnect.Lean.Engine;
using QuantConnect.Logging;
using QuantConnect.Python;
using QuantConnect.Tests;
Expand All @@ -34,6 +35,8 @@ namespace QuantConnect.Tests
[SetUpFixture]
public class AssemblyInitialize
{
private static bool _initialized;

[OneTimeSetUp]
public void InitializeTestEnvironment()
{
Expand All @@ -44,6 +47,12 @@ public void InitializeTestEnvironment()

public static void AdjustCurrentDirectory()
{
if (_initialized)
{
return;
}
_initialized = true;

// nunit 3 sets the current folder to a temp folder we need it to be the test bin output folder
var dir = TestContext.CurrentContext.TestDirectory;
Environment.CurrentDirectory = dir;
Expand Down

0 comments on commit b527a3d

Please sign in to comment.