Skip to content

Commit

Permalink
Replace custom test runner with pytest runner
Browse files Browse the repository at this point in the history
  • Loading branch information
roaffix committed Nov 14, 2020
1 parent 28a0f61 commit eb078ef
Show file tree
Hide file tree
Showing 32 changed files with 1,003 additions and 1,204 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ venv
# IDEs
.vscode
.idea

# Test coverage
.coverage

# Cache
.pytest_cache
.mypy_cache
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ def calc_pi_device(samples):
return 4 * af.count(within_unit_circle) / samples
```


Choosing a particular backend can be done using `af.set_backend(name)` where name is either "_cuda_", "_opencl_", or "_cpu_". The default device is chosen in the same order of preference.
Choosing a particular backend can be done using `af.set_backend(name)` where name is either "_cuda_", "_opencl_", or "_cpu_". The default device is chosen in the same order of preference.

## Requirements

Expand All @@ -41,19 +40,19 @@ Please check the following links for dependencies.

**Install the last stable version:**

```
```bash
pip install arrayfire
```

**Install the development version:**

```
```bash
pip install git+git://github.com/arrayfire/arrayfire-python.git@devel
```

**Installing offline:**

```
```bash
cd path/to/arrayfire-python
python setup.py install
```
Expand All @@ -62,16 +61,16 @@ python setup.py install

Please follow [these instructions](https://github.com/arrayfire/arrayfire-python/wiki) to ensure the arrayfire-python can find the arrayfire libraries.

To run arrayfire tests, you can run the following command from command line.
To run arrayfire smoke tests, you can run the following command from command line.

```
python -m arrayfire.tests
```bash
python setup.py test
```

## Communication

* [Slack Chat](https://join.slack.com/t/arrayfire-org/shared_invite/MjI4MjIzMDMzMTczLTE1MDI5ODg4NzYtN2QwNGE3ODA5OQ)
* [Google Groups](https://groups.google.com/forum/#!forum/arrayfire-users)
- [Slack Chat](https://join.slack.com/t/arrayfire-org/shared_invite/MjI4MjIzMDMzMTczLTE1MDI5ODg4NzYtN2QwNGE3ODA5OQ)
- [Google Groups](https://groups.google.com/forum/#!forum/arrayfire-users)

## Acknowledgements

Expand Down
20 changes: 19 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,32 @@ classifiers =
[options]
packages = find:
python_requires = >=3.6.0
setup_requires =
pytest-runner
tests_require =
flake8-import-order
flake8-quotes
pytest-cov
pytest-flake8
pytest-mypy

[options.packages.find]
include = arrayfire
exclude =
examples
tests

[aliases]
test = pytest

[flake8]
application-import-names = arrayfire
import-order-style = pep8
max-line-length = 119

[tool:pytest]
addopts = --cache-clear --cov=arrayfire --cov-fail-under=70
console_output_style = classic

[coverage:report]
show_missing = true
skip_covered = true
10 changes: 0 additions & 10 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +0,0 @@
#!/usr/bin/env python

#######################################################
# Copyright (c) 2019, ArrayFire
# All rights reserved.
#
# This file is distributed under 3-clause BSD license.
# The complete license agreement can be obtained at:
# http://arrayfire.com/licenses/BSD-3-Clause
########################################################
51 changes: 0 additions & 51 deletions tests/__main__.py

This file was deleted.

44 changes: 0 additions & 44 deletions tests/simple/__init__.py

This file was deleted.

62 changes: 0 additions & 62 deletions tests/simple/_util.py

This file was deleted.

120 changes: 0 additions & 120 deletions tests/simple/algorithm.py

This file was deleted.

Loading

0 comments on commit eb078ef

Please sign in to comment.