Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix known_sytem function and check in tests #485

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions okonomiyaki/platforms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
from .abi import PlatformABI, default_abi
from .epd_platform import EPDPlatform, applies
from ._platform import Platform, OSKind, FamilyKind, NameKind
from ._arch import X86, X86_64, ARM64
from ._arch import X86, X86_64, ARM64, Arch
from .pep425 import compute_abi_tag, compute_python_tag, compute_platform_tag
from .python_implementation import PythonABI, PythonImplementation


__all__ = [
'X86', 'X86_64', 'ARM64', 'EPDPlatform', 'Platform', 'PythonImplementation',
'default_abi'
'default_abi','Arch'
]
2 changes: 1 addition & 1 deletion okonomiyaki/runtimes/tests/test_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class TestPythonRuntime(unittest.TestCase):

@unittest.skipIf(
not known_system,
not known_system(),
'This test should be executed only on Enthought supported platforms')
def test_simple_from_running_python(self):
# When
Expand Down
9 changes: 5 additions & 4 deletions okonomiyaki/utils/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ def __exit__(self, *a, **kw):
patcher.__exit__(*a, **kw)


def known_system(self):
from okonomiyaki.plarforms._platform import (
_guess_os_kind, _guess_platform, _guess_platform_details)
def known_system():
from okonomiyaki.platforms import Arch
from okonomiyaki.platforms._platform import (
_guess_os_kind, _guess_platform_details)
try:
Arch.from_running_system()
os_kind = _guess_os_kind()
_guess_platform(os_kind)
_guess_platform_details(os_kind)
except OkonomiyakiError:
return False
Expand Down
Loading