Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 644 Bytes

_test_two_imports.md

File metadata and controls

50 lines (35 loc) · 644 Bytes

This file contains some additional tests for Python imports.

engine marzano(0.1)
language python

file($body) where {
  $body <: contains `foobar`,
  add_import(source=`import_one`, name=`alice`),
  $body <: maybe contains `trigger_two` where {
    add_import(source=`other_mod`, name=`other_name`),
  }
}

Just one

import nothing

foobar.foo()
from import_one import alice

import nothing

foobar.foo()

Both work

import nothing

foobar.foo()
trigger_two()
from import_one import alice
from other_mod import other_name

import nothing

foobar.foo()
trigger_two()