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:
66dependencies :
77 - python>=3.10
88 # modular MAX installs mojo as well
9- - max=24.5
9+ - max=24.6
1010 - pytest>=7.4
1111 # python-xdist is optional: https://github.com/guidorice/mojo-pytest/wiki#2024-07-17-here-is-a-performance-tip
1212 - pytest-xdist
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ fn fibonacci(n: Int) -> Int:
55 if n <= 1 :
66 return n
77
8- var a = 0
9- var b = 1
8+ a = 0
9+ b = 1
1010 for _ in range (2 , n + 1 ):
1111 a, b = b, a + b
1212 return b
Original file line number Diff line number Diff line change @@ -6,5 +6,5 @@ fn random_tensor[T: DType]() raises -> Tensor[T]:
66 """
77 Wraps Tensor.rand() and multiplies a few tensors.
88 """
9- var Shape = TensorShape(100 , 1 )
9+ Shape = TensorShape(100 , 1 )
1010 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():
77 """
88 Test fibonacci 10th number.
99 """
10- var expect = 55
11- var got = fibonacci(10 )
10+ expect = 55
11+ got = fibonacci(10 )
1212 assert_equal(got, expect)
1313
1414
1515def test_fibonacci_reference ():
1616 """
1717 Test mojo fibonacci versus python "reference" implementation.
1818 """
19- var py = Python.import_module(" my_package.fibonacci" )
19+ py = Python.import_module(" my_package.fibonacci" )
2020 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)
2323 assert_equal(got, expect)
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ def test_random_tensor():
77 Validate the random_tensor module in my_package.
88 """
99 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 ]
1212 assert_false(isnan(sample_value))
1313 assert_true(isfinite(sample_value))
Original file line number Diff line number Diff line change 11[project ]
22name = " pytest-mojo"
3- version = " v24.5 "
3+ version = " v24.6 "
44description = " Mojo🔥 language test runner plugin for pytest. (aka pytest-mojo)"
55authors = [{name = " Alex G Rice" , email = " alex@ricegeo.dev" }]
66license = {file = " LICENSE" }
77requires-python = " >=3.10"
8+
89[build-system ]
910requires = [" setuptools>=45" , " wheel" ]
1011build-backend = " setuptools.build_meta"
You can’t perform that action at this time.
0 commit comments