Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Spico197 committed Jul 27, 2023
1 parent deacfcb commit 1fefdf7
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pre:

.PHONY: debug
debug:
pytest -vv tests/tasks/test_re.py
pytest -vv tests/utils/test_logging.py

.PHONY: clean
clean:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- Make sure the Python version `>=3.10` (a strict version contraint for better type hinting)

```bash
$ conda install git # upgrade git
$ git clone [email protected]:pjlab-sys4nlp/train-moe.git
$ cd train-moe
$ pip install -e .[dev]
Expand Down
Empty file added tests/utils/__init__.py
Empty file.
16 changes: 16 additions & 0 deletions tests/utils/test_logging.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import pytest

from smoe.utils.logging import get_logger


def err_func():
return 1 / 0


def test_log():
logger = get_logger("test")


def test_err_func():
with pytest.raises(ZeroDivisionError):
res = err_func()
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ exclude =
# This contains builds of flake8 that we don't want to check
dist,
bak,
data
data,
outputs

0 comments on commit 1fefdf7

Please sign in to comment.