Skip to content

Missing package imports in test cases #206

@Prajna1999

Description

@Prajna1999

Inside the test/* folder almost all scripts are missing top level package import. For instance, inside
test/dataobjects.jl following imports are missing and the interpreter throwing Variable not defined inside "Main" error.

test/dataobjects.jl
# constants
DATA_SIZE = 400;
COLUMN_NO = 100;

# global variables
random(x) = rand(MersenneTwister(123), x);
data_vector = randn(DATA_SIZE);
integer_data_vector = rand(-100:100, DATA_SIZE);
data_array = Array([data_vector data_vector]);
data_array_long = reduce(hcat, [randn(DATA_SIZE) for i in 1:COLUMN_NO])

column_vector = ["data$i" for i in 1:COLUMN_NO]

index_range = 1:DATA_SIZE;
index_integer = collect(index_range);
index_timetype = Date(2007, 1, 1) + Day.(0:(DATA_SIZE-1));

df_vector = DataFrame([data_vector], ["data"]);
df_integer_index = DataFrame(Index=index_integer, data=data_vector);
df_timetype_index = DataFrame(Index=index_timetype, data=data_vector);
df_timetype_index_long_columns = insertcols!(
    DataFrame(data_array_long, column_vector), 1, :Index => index_timetype)

should instead be

using Random
using DataFrames
using Dates

....other lines remain the same

@chiraganand can you label it as a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions