Skip to content

Commit

Permalink
separate unit tests and integration tests (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpnota committed Nov 6, 2020
1 parent c37b6b9 commit 79d5ee6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
install:
pip install -e .[dev]

test:
test: unit-test integration-test

unit-test:
python -m unittest discover -s all -p "*test.py"

integration-test:
python -m unittest discover -s integration -p "*test.py"

lint:
flake8 --ignore "E501,E731,E74,E402,F401,W503,E128" all

Expand Down
3 changes: 2 additions & 1 deletion all/presets/atari_test.py → integration/atari_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import unittest
import torch
from all.environments import AtariEnvironment
from all.presets.validate_agent import validate_agent
from all.presets.atari import (
a2c,
c51,
Expand All @@ -14,6 +13,8 @@
vsarsa,
vqn
)
from validate_agent import validate_agent


CPU = torch.device("cpu")
if torch.cuda.is_available():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import unittest
from all.environments import GymEnvironment
from all.presets.validate_agent import validate_agent
from all.presets.classic_control import (
a2c,
c51,
Expand All @@ -13,6 +12,7 @@
vqn,
vsarsa,
)
from validate_agent import validate_agent


class TestClassicControlPresets(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
from all.environments import GymEnvironment
from all.presets.validate_agent import validate_agent
from all.presets.continuous import ddpg, ppo, sac
from validate_agent import validate_agent


class TestContinuousPresets(unittest.TestCase):
Expand Down
File renamed without changes.

0 comments on commit 79d5ee6

Please sign in to comment.