Skip to content

Commit

Permalink
tests: extend multipackage test to include numpy
Browse files Browse the repository at this point in the history
Testing with numpy is rather heavy-weight, but it is a sure to
reveal any problems. For example, mishandling of extensions that
are embedded in package sub-directories.
  • Loading branch information
rokm committed Mar 6, 2021
1 parent aaa20cf commit 9a145eb
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 0 deletions.
Expand Up @@ -26,3 +26,7 @@
secret = fp.read().strip()
print("Read secret from %s: %r" % (secret_file, secret))
assert secret == 'Secret1234'

# import numpy, which has several extensions in its package subdirectories
import numpy # noqa: E402, F401
print("Imported numpy!")
Expand Up @@ -26,3 +26,7 @@
secret = fp.read().strip()
print("Read secret from %s: %r" % (secret_file, secret))
assert secret == 'Secret1234'

# import numpy, which has several extensions in its package subdirectories
import numpy # noqa: E402, F401
print("Imported numpy!")
Expand Up @@ -26,3 +26,7 @@
secret = fp.read().strip()
print("Read secret from %s: %r" % (secret_file, secret))
assert secret == 'Secret1234'

# import numpy, which has several extensions in its package subdirectories
import numpy # noqa: E402, F401
print("Imported numpy!")
Expand Up @@ -26,3 +26,7 @@
secret = fp.read().strip()
print("Read secret from %s: %r" % (secret_file, secret))
assert secret == 'Secret1234'

# import numpy, which has several extensions in its package subdirectories
import numpy # noqa: E402, F401
print("Imported numpy!")
Expand Up @@ -26,3 +26,7 @@
secret = fp.read().strip()
print("Read secret from %s: %r" % (secret_file, secret))
assert secret == 'Secret1234'

# import numpy, which has several extensions in its package subdirectories
import numpy # noqa: E402, F401
print("Imported numpy!")
Expand Up @@ -26,3 +26,7 @@
secret = fp.read().strip()
print("Read secret from %s: %r" % (secret_file, secret))
assert secret == 'Secret1234'

# import numpy, which has several extensions in its package subdirectories
import numpy # noqa: E402, F401
print("Imported numpy!")
Expand Up @@ -26,3 +26,7 @@
secret = fp.read().strip()
print("Read secret from %s: %r" % (secret_file, secret))
assert secret == 'Secret1234'

# import numpy, which has several extensions in its package subdirectories
import numpy # noqa: E402, F401
print("Imported numpy!")
Expand Up @@ -26,3 +26,7 @@
secret = fp.read().strip()
print("Read secret from %s: %r" % (secret_file, secret))
assert secret == 'Secret1234'

# import numpy, which has several extensions in its package subdirectories
import numpy # noqa: E402, F401
print("Imported numpy!")
Expand Up @@ -26,3 +26,7 @@
secret = fp.read().strip()
print("Read secret from %s: %r" % (secret_file, secret))
assert secret == 'Secret1234'

# import numpy, which has several extensions in its package subdirectories
import numpy # noqa: E402, F401
print("Imported numpy!")
Expand Up @@ -26,3 +26,7 @@
secret = fp.read().strip()
print("Read secret from %s: %r" % (secret_file, secret))
assert secret == 'Secret1234'

# import numpy, which has several extensions in its package subdirectories
import numpy # noqa: E402, F401
print("Imported numpy!")
Expand Up @@ -26,3 +26,7 @@
secret = fp.read().strip()
print("Read secret from %s: %r" % (secret_file, secret))
assert secret == 'Secret1234'

# import numpy, which has several extensions in its package subdirectories
import numpy # noqa: E402, F401
print("Imported numpy!")
3 changes: 3 additions & 0 deletions tests/functional/test_multipackage.py
@@ -1,6 +1,9 @@
import pytest

from PyInstaller.utils.tests import importorskip


@importorskip('numpy')
@pytest.mark.parametrize(
"spec_file",
(
Expand Down

0 comments on commit 9a145eb

Please sign in to comment.