Test order randomization
diff --git a/tests/behavioral/test_command.py b/tests/behavioral/test_command.py
deleted file mode 100644
index fbee1059..00000000
--- a/tests/behavioral/test_command.py
+++ /dev/null
@@ -1,57 +0,0 @@
-import os
-import shutil
-import unittest
-from patterns.behavioral.command import MoveFileCommand
-
-
-class CommandTest(unittest.TestCase):
-    @classmethod
-    def __get_test_directory(self):
-        """
-        Get the temporary directory for the tests.
-        """
-        self.test_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test_command')
-
-    @classmethod
-    def setUpClass(self):
-        """
-        - Create a temporary directory and file
-        /test_command
-           /foo.txt
-        - get the temporary test directory
-        - and initializes the command stack.
-        """
-        os.mkdir('tests/behavioral/test_command')
-        open('tests/behavioral/test_command/foo.txt', 'w').close()
-        self.__get_test_directory()
-        self.command_stack = []
-        self.command_stack.append(
-            MoveFileCommand(os.path.join(self.test_dir, 'foo.txt'), os.path.join(self.test_dir, 'bar.txt'))
-        )
-        self.command_stack.append(
-            MoveFileCommand(os.path.join(self.test_dir, 'bar.txt'), os.path.join(self.test_dir, 'baz.txt'))
-        )
-
-    def test_sequential_execution(self):
-        self.command_stack[0].execute()
-        output_after_first_execution = os.listdir(self.test_dir)
-        self.assertEqual(output_after_first_execution[0], 'bar.txt')
-        self.command_stack[1].execute()
-        output_after_second_execution = os.listdir(self.test_dir)
-        self.assertEqual(output_after_second_execution[0], 'baz.txt')
-
-    def test_sequential_undo(self):
-        self.command_stack = list(reversed(self.command_stack))
-        self.command_stack[0].undo()
-        output_after_first_undo = os.listdir(self.test_dir)
-        self.assertEqual(output_after_first_undo[0], 'bar.txt')
-        self.command_stack[1].undo()
-        output_after_second_undo = os.listdir(self.test_dir)
-        self.assertEqual(output_after_second_undo[0], 'foo.txt')
-
-    @classmethod
-    def tearDownClass(self):
-        """
-        Remove the temporary directory /test_command and its content.
-        """
-        shutil.rmtree('tests/behavioral/test_command')
diff --git a/tests/behavioral/test_observer.py b/tests/behavioral/test_observer.py
index ae7a53a6..e24efe44 100644
--- a/tests/behavioral/test_observer.py
+++ b/tests/behavioral/test_observer.py
@@ -1,58 +1,29 @@
-import unittest
-from unittest.mock import patch
-
-from patterns.behavioral.observer import Subject, Data, DecimalViewer, HexViewer
-
-
-class TestSubject(unittest.TestCase):
-    @classmethod
-    def setUpClass(cls):
-        cls.s = Subject()
-        cls.dec_obs = DecimalViewer()
-        cls.hex_obs = HexViewer()
-
-    def test_a_observer_list_shall_be_empty_initially(cls):
-        cls.assertEqual(len(cls.s._observers), 0)
-
-    def test_b_observers_shall_be_attachable(cls):
-        cls.s.attach(cls.dec_obs)
-        cls.assertEqual(isinstance(cls.s._observers[0], DecimalViewer), True)
-        cls.assertEqual(len(cls.s._observers), 1)
-        cls.s.attach(cls.hex_obs)
-        cls.assertEqual(isinstance(cls.s._observers[1], HexViewer), True)
-        cls.assertEqual(len(cls.s._observers), 2)
-
-    def test_c_observers_shall_be_detachable(cls):
-        cls.s.detach(cls.dec_obs)
-        # hex viewer shall be remaining if dec viewer is detached first
-        cls.assertEqual(isinstance(cls.s._observers[0], HexViewer), True)
-        cls.assertEqual(len(cls.s._observers), 1)
-        cls.s.detach(cls.hex_obs)
-        cls.assertEqual(len(cls.s._observers), 0)
-
-
-class TestData(unittest.TestCase):
-    @classmethod
-    def setUpClass(cls):
-        cls.dec_obs = DecimalViewer()
-        cls.hex_obs = HexViewer()
-        cls.sub = Data('Data')
-        # inherited behavior already tested with TestSubject
-        cls.sub.attach(cls.dec_obs)
-        cls.sub.attach(cls.hex_obs)
-
-    def test_data_change_shall_notify_all_observers_once(cls):
-        with patch.object(cls.dec_obs, 'update') as mock_dec_obs_update, patch.object(
-            cls.hex_obs, 'update'
-        ) as mock_hex_obs_update:
-            cls.sub.data = 10
-            cls.assertEqual(mock_dec_obs_update.call_count, 1)
-            cls.assertEqual(mock_hex_obs_update.call_count, 1)
-
-    def test_data_value_shall_be_changeable(cls):
-        cls.sub.data = 20
-        cls.assertEqual(cls.sub._data, 20)
-
-    def test_data_name_shall_be_changeable(cls):
-        cls.sub.name = 'New Data Name'
-        cls.assertEqual(cls.sub.name, 'New Data Name')
+from unittest.mock import patch, Mock
+
+import pytest
+
+from patterns.behavioral.observer import Data, DecimalViewer, HexViewer
+
+
+@pytest.fixture
+def observable():
+    return Data('some data')
+
+def test_attach_detach(observable):
+    decimal_viewer = DecimalViewer()
+    assert len(observable._observers) == 0
+
+    observable.attach(decimal_viewer)
+    assert decimal_viewer in observable._observers
+
+    observable.detach(decimal_viewer)
+    assert decimal_viewer not in observable._observers
+
+def test_one_data_change_notifies_each_observer_once(observable):
+    observable.attach(DecimalViewer())
+    observable.attach(HexViewer())
+
+    with patch('patterns.behavioral.observer.DecimalViewer.update', new_callable=Mock()) as mocked_update:
+        assert mocked_update.call_count == 0
+        observable.data = 10
+        assert mocked_update.call_count == 1
diff --git a/tests/behavioral/test_state.py b/tests/behavioral/test_state.py
index 53dbf9bd..adaae509 100644
--- a/tests/behavioral/test_state.py
+++ b/tests/behavioral/test_state.py
@@ -1,54 +1,24 @@
-import unittest
+import pytest
+
 from patterns.behavioral.state import Radio
 
 
-class RadioTest(unittest.TestCase):
-    """
-    Attention: Test case results depend on test case execution. The test cases
-    in this integration test class should be executed in an explicit order:
-    http://stackoverflow.com/questions/5387299/python-unittest-testcase-execution-order
-    """
-
-    @classmethod
-    def setUpClass(self):
-        self.radio = Radio()
-
-    def test_initial_state(self):
-        state = self.radio.state.name
-        expected_state_name = 'AM'
-        self.assertEqual(state, expected_state_name)
-
-    def test_initial_am_station(self):
-        station = self.radio.state.stations[self.radio.state.pos]
-        expected_station = '1250'
-        self.assertEqual(station, expected_station)
-
-    def test_2nd_am_station_after_scan(self):
-        self.radio.scan()
-        station = self.radio.state.stations[self.radio.state.pos]
-        expected_station = '1380'
-        self.assertEqual(station, expected_station)
-
-    def test_3rd_am_station_after_scan(self):
-        self.radio.scan()
-        station = self.radio.state.stations[self.radio.state.pos]
-        expected_station = '1510'
-        self.assertEqual(station, expected_station)
-
-    def test_am_station_overflow_after_scan(self):
-        self.radio.scan()
-        station = self.radio.state.stations[self.radio.state.pos]
-        expected_station = '1250'
-        self.assertEqual(station, expected_station)
-
-    def test_shall_toggle_from_am_to_fm(self):
-        self.radio.toggle_amfm()
-        state = self.radio.state.name
-        expected_state_name = 'FM'
-        self.assertEqual(state, expected_state_name)
-
-    def test_shall_toggle_from_fm_to_am(self):
-        self.radio.toggle_amfm()
-        state = self.radio.state.name
-        expected_state_name = 'AM'
-        self.assertEqual(state, expected_state_name)
+@pytest.fixture
+def radio():
+    return Radio()
+
+def test_initial_state(radio):
+    assert radio.state.name == 'AM'
+
+def test_initial_am_station(radio):
+    initial_pos = radio.state.pos
+    assert radio.state.stations[initial_pos] == '1250'
+
+def test_toggle_amfm(radio):
+    assert radio.state.name == 'AM'
+
+    radio.toggle_amfm()
+    assert radio.state.name == 'FM'
+
+    radio.toggle_amfm()
+    assert radio.state.name == 'AM'
diff --git a/tox.ini b/tox.ini
index d702da2b..d86eeec9 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,8 +11,7 @@ commands =
     flake8 patterns/
     ; `randomly-seed` option from `pytest-randomly` helps with deterministic outputs for examples like `other/blackboard.py`
     pytest --randomly-seed=1234 --doctest-modules patterns/
-    ; `-p no:randomly` turns off `randomly` plugin for unit tests
-    pytest -s -vv --cov={envsitepackagesdir}/patterns --log-level=INFO -p no:randomly tests/
+    pytest -s -vv --cov={envsitepackagesdir}/patterns --log-level=INFO tests/
 
 
 [testenv:cov-report]

- without these changes test suite sometimes depends on tests ordering (bad practice in general)
- deleted tests are fully covered in script's doctests
- rewrote in pytest style