<pre style='margin:0'>
Cyril Roelandt (Steap) pushed a commit to branch master
in repository upt-macports.
</pre>
<p><a href="https://github.com/macports/upt-macports/commit/47a65b182a5e1b25769456901571f797efd073ac">https://github.com/macports/upt-macports/commit/47a65b182a5e1b25769456901571f797efd073ac</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 47a65b182a5e1b25769456901571f797efd073ac
</span>Author: Korusuke <karan.sheth@somaiya.edu>
AuthorDate: Sat May 4 22:15:26 2019 +0530
<span style='display:block; white-space:pre;color:#404040;'> Add MacPorts backend tests
</span>---
upt_macports/tests/test_macports_backend.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/upt_macports/tests/test_macports_backend.py b/upt_macports/tests/test_macports_backend.py
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..134a9f8
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/upt_macports/tests/test_macports_backend.py
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,18 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+import unittest
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+import upt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+from upt_macports.upt_macports import MacPortsBackend
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+class TestMacPortsBackend(unittest.TestCase):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def setUp(self):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ self.macports_backend = MacPortsBackend()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def test_unhandled_frontend(self):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ upt_pkg = upt.Package('foo', '42')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ upt_pkg.frontend = 'invalid frontend'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ with self.assertRaises(upt.UnhandledFrontendError):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ self.macports_backend.create_package(upt_pkg)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if __name__ == '__main__':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unittest.main()
</span></pre><pre style='margin:0'>
</pre>