"using" module within the same file where module was defined


#1

I have the following scheme for writing tests: in a single file I define multiple modules, which are then "used"
and the test function defined within them is run.

module mmiscellaneous1mmm
using FinEtools
using Test
function test()
  ... code omitted
  @test bfes.conn == [1 2; 5 1; 2 3; 3 4; 4 8; 9 5; 8 12; 10 9; 11 10; 12 11]
end
end
using mmiscellaneous1mmm
mmiscellaneous1mmm.test()

And so on, several modules in this file.

Today I downloaded the 0.7 and the tests would not run.

Miscellaneous: Error During Test
  Got an exception of type LoadError outside of a @test
  LoadError: ArgumentError: Module mmiscellaneous1mmm not found in current path.
  Run `Pkg.add("mmiscellaneous1mmm")` to install the mmiscellaneous1mmm package.
  Stacktrace:
   [1] _require(::Symbol) at .\loading.jl:417
  ... The rest is omitted

Is this a bug or feature?

My setup:

julia> versioninfo()
Julia Version 0.7.0-DEV.2036
Commit 6c4e30e367* (2017-10-02 16:24 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-6650U CPU @ 2.20GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, skylake)
Environment:

#2

It’s the expected behavior. Instead, use using .mmiscellaneous1mmm (note the leading .).


#3

@ararslan: Thanks!


Can 0.6 and 0.7 no longer coexist?