Skip to content

Commit

Permalink
Fixes to support mojo v24.3 (#14)
Browse files Browse the repository at this point in the history
* Fixes to support mojo v24.3

* Fix mojo installation
  • Loading branch information
guidorice authored May 2, 2024
1 parent 1296bce commit 7171669
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
run: |
curl https://get.modular.com | sh -
modular auth ${{ secrets.MODULAR_AUTH }}
modular install --install-version 24.2.1-2f0dcf11-release mojo
modular install --install-version 24.3.0 mojo
pip install .
- name: Integration Tests
run: |
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ example
```text
$ pytest
============================= test session starts ==============================
platform darwin -- Python 3.12.0, pytest-7.4.0, pluggy-1.0.0
platform darwin -- Python 3.11.9, pytest-7.4.3, pluggy-1.3.0
rootdir: /Users/guidorice/mojo/mojo-pytest
plugins: mojo-24.2.1
plugins: mojo-24.3.0
collected 18 items
example/tests/suffix_test.mojo . [ 5%]
Expand All @@ -96,10 +96,10 @@ example/tests/mod_b/test_greet.mojo . [100%]
=================================== FAILURES ===================================
_______________________________ maths more: 42 ________________________________
(<MojoTestItem maths more: 42>, 'AssertionError: bad maths: 42')
(<MojoTestItem maths more: 42>, 'At /.../mojo-pytest/example/tests/util.mojo:21:32: AssertionError: bad maths: 42')
=========================== short test summary info ============================
FAILED example/tests/mod_a/test_maths.mojo:: maths more: 42
========================= 1 failed, 17 passed in 2.54s =========================
========================= 1 failed, 17 passed in 1.82s =========================
```

## Links
Expand Down
2 changes: 1 addition & 1 deletion pytest_mojo/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def __init__(self, *, name: str, parent, spec: dict[str, Any], **kwargs):

def runtest(self):
if self.spec.get("code") or any(
item.startswith(TEST_FAILED_PREFIX) for item in self.spec["stdout"]
TEST_FAILED_PREFIX in item for item in self.spec["stdout"]
):
raise MojoTestException(self, self.spec["stdout"][-1])

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="pytest-mojo",
version="24.2.1",
version="24.3.0",
packages=find_packages(),
entry_points={"pytest11": ["mojo = pytest_mojo.plugin"]},
install_requires=["pytest"],
Expand Down

0 comments on commit 7171669

Please sign in to comment.