El lunes, 7 de abril de 2014 20:09:47 UTC-5, Jameson escribió: > > `using X` will always prefer an existing module Main.X over reading > code off of the hard drive. > > or you can prefix it with `include("../DataStructures.jl")` > > you may also consider putting your testsuite in a module also (and/or > using evalfile instead of include), so that you get an entirely > private copy of the module. note that you would need to switch to > `using .DataStructures` (with one dot), to make the relative import > work correctly >
Thanks. To run the tests from the terminal, the following seems to work: `require("../src/DataStructures.jl") include("test_disjoint_sets.jl") ` > > On Mon, Apr 7, 2014 at 5:45 PM, David P. Sanders > <dpsa...@gmail.com<javascript:>> > wrote: > > Hi, > > > > I am making some modifications to the DataStructures package to add the > > functionality to be able to add new sets in DisjointSets. > > > > From the command line, it seems to be possible to use > > > > julia> reload("DataStructures.jl") > > > > to load my variant of the code. > > > > My question is about the tests in test_disjoint_set.jl, which is in the > test > > subdirectory and has the line > > Using DataStructures > > > > What do I need to do so that the DataStructures.jl file imported is my > > modified one from the current parent directory, rather than the one from > the > > ~/.julia directory? This needs to be done without touching these > imports, so > > as not to mess up the git repository I guess. > > > > Thanks, > > David. >