mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
update tests
This commit is contained in:
parent
31f8a0cfc3
commit
8e665439c0
1 changed files with 4 additions and 4 deletions
|
@ -25,23 +25,23 @@ def teardown():
|
|||
unload_builtins()
|
||||
|
||||
def test_import():
|
||||
with mock_xonsh_env({}):
|
||||
with mock_xonsh_env({'PATH': []}):
|
||||
import sample
|
||||
assert_equal('hello mom jawaka\n', sample.x)
|
||||
|
||||
def test_absolute_import():
|
||||
with mock_xonsh_env({}):
|
||||
with mock_xonsh_env({'PATH': []}):
|
||||
from xpack import sample
|
||||
assert_equal('hello mom jawaka\n', sample.x)
|
||||
|
||||
def test_relative_import():
|
||||
with mock_xonsh_env({}):
|
||||
with mock_xonsh_env({'PATH': []}):
|
||||
from xpack import relimp
|
||||
assert_equal('hello mom jawaka\n', relimp.sample.x)
|
||||
assert_equal('hello mom jawaka\ndark chest of wonders', relimp.y)
|
||||
|
||||
def test_sub_import():
|
||||
with mock_xonsh_env({}):
|
||||
with mock_xonsh_env({'PATH': []}):
|
||||
from xpack.sub import sample
|
||||
assert_equal('hello mom jawaka\n', sample.x)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue