From: 
Subject: Debian changes

The Debian packaging of pymonoprice is maintained in git, using a workflow
similar to the one described in dgit-maint-merge(7).
The Debian delta is represented by this one combined patch; there isn't a
patch queue that can be represented as a quilt series.

A detailed breakdown of the changes is available from their canonical
representation -- git commits in the packaging repository.
For example, to see the changes made by the Debian maintainer in the first
upload of upstream version 1.2.3, you could use:

    % git clone https://git.dgit.debian.org/pymonoprice
    % cd pymonoprice
    % git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'

(If you have dgit, use `dgit clone pymonoprice`, rather than plain `git clone`.)

We don't use debian/source/options single-debian-patch because it has bugs.
Therefore, NMUs etc. may nevertheless have made additional patches.

---

diff --git a/tests/test_monoprice.py b/tests/test_monoprice.py
index 4cdb804..15bc998 100644
--- a/tests/test_monoprice.py
+++ b/tests/test_monoprice.py
@@ -331,18 +331,30 @@ class TestAsyncMonoprice(TestMonoprice):
 
     def setUp(self):
         self.responses = {}
-        loop = asyncio.new_event_loop()
-        self.addCleanup(loop.close)
-        monoprice = loop.run_until_complete(get_async_monoprice(create_dummy_port(self.responses)))
+        self._loop = asyncio.new_event_loop()
+        asyncio.set_event_loop(self._loop)
+        monoprice = self._loop.run_until_complete(
+            get_async_monoprice(create_dummy_port(self.responses))
+        )
 
         # Dummy monoprice that converts async to sync
+        loop = self._loop
+
         class DummyMonoprice():
             def __getattribute__(self, item):
+                target = getattr(monoprice, item)
+
                 def f(*args, **kwargs):
-                    return loop.run_until_complete(monoprice.__getattribute__(item)(*args, **kwargs))
+                    return loop.run_until_complete(target(*args, **kwargs))
                 return f
         self.monoprice = DummyMonoprice()
 
+    def tearDown(self):
+        try:
+            asyncio.set_event_loop(None)
+        finally:
+            self._loop.close()
+
     def test_timeout(self):
         with self.assertRaises(asyncio.TimeoutError):
             self.monoprice.set_source(3, 3)
