FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Replace tests with pytest runner by roaffix · Pull Request #244 · arrayfire/arrayfire-python · GitHub

Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cfg  (1) .md  (1) .py  (29) dotfile  (1) All 4 file types selected
Deleted files Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
7 changes: 7 additions & 0 deletions .gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL