From dd23f97d48bc66d4f261f4cf322bb153d61bdba3 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mar 19 2018 10:39:01 +0000 Subject: Run simple import test in check phase --- diff --git a/python-netmiko.spec b/python-netmiko.spec index 55c2545..65bba66 100644 --- a/python-netmiko.spec +++ b/python-netmiko.spec @@ -28,6 +28,19 @@ Requires: python2-scp >= 0.10.0 Requires: PyYAML Requires: python2-pyserial Requires: python2-textfsm +# For import test, keep the same as requirements +BuildRequires: python2-paramiko +BuildRequires: python2-scp +BuildRequires: PyYAML +BuildRequires: python2-pyserial +BuildRequires: python2-textfsm +%if 0%{?with_python3} +BuildRequires: python3-paramiko +BuildRequires: python3-scp +BuildRequires: python3-PyYAML +BuildRequires: python3-pyserial +BuildRequires: python3-textfsm +%endif %{?python_provide:%python_provide python2-%{srcname}} @@ -74,8 +87,13 @@ Requires: python3-textfsm %endif %check -# FIXME: run unit tests, when upstream starts shipping them: -# https://github.com/ktbyers/netmiko/issues/508 +# FIXME: run unit tests, when/if upstream creates them: +# https://github.com/ktbyers/netmiko/issues/509 +%{__python2} -c "from netmiko import ConnectHandler" + +%if 0%{?with_python3} +%{__python3} -c "from netmiko import ConnectHandler" +%endif %files -n python2-%{srcname}