diff options
| author | René Fritze <47802+renefritze@users.noreply.github.com> | 2021-08-05 10:09:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-05 10:09:08 +0200 |
| commit | dde5508ea6dba400c48db5bfafee7747bb59ae34 (patch) | |
| tree | a8b47cfb5fac8e0facbaa01173f6fbdd5a861872 /tests/testdata/python3/data | |
| parent | e92c36d12a2054019a16c8b623163a9f2908ef7d (diff) | |
| download | astroid-git-dde5508ea6dba400c48db5bfafee7747bb59ae34.tar.gz | |
Conditional test pickle (#935)
* [tests] adds a test for conditional definition lookup
* [tests] duplicate the conditional def test into a sub package
* add pyMOR example code and change test to only check for Uninferable
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests/testdata/python3/data')
| -rw-r--r-- | tests/testdata/python3/data/conditional.py | 6 | ||||
| -rw-r--r-- | tests/testdata/python3/data/conditional_import/__init__.py | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/testdata/python3/data/conditional.py b/tests/testdata/python3/data/conditional.py new file mode 100644 index 00000000..8f607c23 --- /dev/null +++ b/tests/testdata/python3/data/conditional.py @@ -0,0 +1,6 @@ +from data.conditional_import import ( + dump, + # dumps, + # load, + # loads, +)
\ No newline at end of file diff --git a/tests/testdata/python3/data/conditional_import/__init__.py b/tests/testdata/python3/data/conditional_import/__init__.py new file mode 100644 index 00000000..38306e34 --- /dev/null +++ b/tests/testdata/python3/data/conditional_import/__init__.py @@ -0,0 +1,11 @@ + +from pprint import pformat + +if False: + + def dump(obj, file, protocol=None): + pass + +else: + from functools import partial + dump = partial(pformat, indent=0) |
