File tree Expand file tree Collapse file tree 6 files changed +13
-12
lines changed Expand file tree Collapse file tree 6 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ channels:
6
6
dependencies :
7
7
- python>=3.10
8
8
# modular MAX installs mojo as well
9
- - max=24.5
9
+ - max=24.6
10
10
- pytest>=7.4
11
11
# python-xdist is optional: https://github.com/guidorice/mojo-pytest/wiki#2024-07-17-here-is-a-performance-tip
12
12
- pytest-xdist
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ fn fibonacci(n: Int) -> Int:
5
5
if n <= 1 :
6
6
return n
7
7
8
- var a = 0
9
- var b = 1
8
+ a = 0
9
+ b = 1
10
10
for _ in range (2 , n + 1 ):
11
11
a, b = b, a + b
12
12
return b
Original file line number Diff line number Diff line change @@ -6,5 +6,5 @@ fn random_tensor[T: DType]() raises -> Tensor[T]:
6
6
"""
7
7
Wraps Tensor.rand() and multiplies a few tensors.
8
8
"""
9
- var Shape = TensorShape(100 , 1 )
9
+ Shape = TensorShape(100 , 1 )
10
10
return Tensor[T].rand(Shape) * Tensor[T].rand(Shape) * Tensor[T].rand(Shape)
Original file line number Diff line number Diff line change @@ -7,17 +7,17 @@ def test_fibonacci():
7
7
"""
8
8
Test fibonacci 10th number.
9
9
"""
10
- var expect = 55
11
- var got = fibonacci(10 )
10
+ expect = 55
11
+ got = fibonacci(10 )
12
12
assert_equal(got, expect)
13
13
14
14
15
15
def test_fibonacci_reference ():
16
16
"""
17
17
Test mojo fibonacci versus python "reference" implementation.
18
18
"""
19
- var py = Python.import_module(" my_package.fibonacci" )
19
+ py = Python.import_module(" my_package.fibonacci" )
20
20
for n in range (0 , 10 ):
21
- var expect = py.fibonacci(n)
22
- var got = fibonacci(n)
21
+ expect = py.fibonacci(n)
22
+ got = fibonacci(n)
23
23
assert_equal(got, expect)
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ def test_random_tensor():
7
7
Validate the random_tensor module in my_package.
8
8
"""
9
9
alias T = DType.float64
10
- var t = random_tensor[T]()
11
- var sample_value = t[0 ]
10
+ t = random_tensor[T]()
11
+ sample_value = t[0 ]
12
12
assert_false(isnan(sample_value))
13
13
assert_true(isfinite(sample_value))
Original file line number Diff line number Diff line change 1
1
[project ]
2
2
name = " pytest-mojo"
3
- version = " v24.5 "
3
+ version = " v24.6 "
4
4
description = " Mojo🔥 language test runner plugin for pytest. (aka pytest-mojo)"
5
5
authors = [{name = " Alex G Rice" , email = " alex@ricegeo.dev" }]
6
6
license = {file = " LICENSE" }
7
7
requires-python = " >=3.10"
8
+
8
9
[build-system ]
9
10
requires = [" setuptools>=45" , " wheel" ]
10
11
build-backend = " setuptools.build_meta"
You can’t perform that action at this time.
0 commit comments