-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix testing for editable and non-editable installs alike (#213)
- Loading branch information
Showing
15 changed files
with
86 additions
and
46 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
install_subdir('tests', install_dir: py.get_install_dir() / 'example_pkg/submodule') |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def test_something(): | ||
pass |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
from . import meson | ||
__all__ = ["meson"] | ||
|
||
# Backward compatibility with older versions | ||
build = meson.build | ||
test = meson.test | ||
ipython = meson.ipython | ||
python = meson.python | ||
shell = meson.shell | ||
from . import meson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import os | ||
|
||
from testutil import spin | ||
|
||
|
||
def test_test(): | ||
"""Does the test command run?""" | ||
spin("test") | ||
|
||
|
||
def test_test_with_pythonpath(): | ||
"""Does `spin test` work when PYTHONPATH is set?""" | ||
spin("test", env={**os.environ, "PYTHONPATH": "/tmp"}) | ||
|
||
|
||
def test_test_file_spec(): | ||
spin("test", "example_pkg/submodule/tests/test_submodule.py") | ||
|
||
|
||
def test_test_module_spec(): | ||
spin("test", "example_pkg.submodule") | ||
|
||
|
||
def test_test_editable_file_spec(editable_install): | ||
spin("test", "example_pkg/submodule/tests/test_submodule.py") | ||
|
||
|
||
def test_test_editable_module_spec(editable_install): | ||
spin("test", "example_pkg.submodule") |