Skip to content

Commit

Permalink
Replace python-nose with unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
pkratoch authored and lukash committed Mar 9, 2021
1 parent a2922c5 commit 4351006
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
3 changes: 0 additions & 3 deletions dnf-plugins-core.spec
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,8 @@ Summary: Core Plugins for DNF
BuildRequires: python2-dnf >= %{dnf_lowest_compatible}
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: dbus-python
BuildRequires: python-nose
%else
BuildRequires: python2-dbus
BuildRequires: python2-nose
%endif
BuildRequires: python2-devel
%if 0%{?fedora}
Expand Down Expand Up @@ -147,7 +145,6 @@ Summary: Core Plugins for DNF
BuildRequires: python3-dbus
BuildRequires: python3-devel
BuildRequires: python3-dnf >= %{dnf_lowest_compatible}
BuildRequires: python3-nose
%if 0%{?fedora}
Requires: python3-distro
%endif
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ADD_TEST(test ${PYTHON_EXECUTABLE} -m nose -s ${CMAKE_CURRENT_SOURCE_DIR})
ADD_TEST(test ${PYTHON_EXECUTABLE} -m unittest discover -t ${CMAKE_CURRENT_SOURCE_DIR}/.. -s ${CMAKE_CURRENT_SOURCE_DIR})

# ASAN_OPTIONS is for libdnf built with sanitizers, has no effect otherwise.
SET_PROPERTY(TEST test PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_SOURCE_DIR}/plugins;ASAN_OPTIONS=verify_asan_link_order=0")
4 changes: 1 addition & 3 deletions tests/README
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ To run tests from the source tree, run this
(working directory = root of the source tree):

export PYTHONPATH=./plugins
nosetests tests/
python3 -m unittest discover -t . -s tests/

You can run tests under specific Python version using nosetests-2.7
or nosetests-3.4.

0 comments on commit 4351006

Please sign in to comment.