| 1 | # -*- coding: utf-8 -*- |
| 2 | # Copyright (C) 2010, 2011, 2012 Sebastian Wiesner <[email protected]> |
| 3 | |
| 4 | # This library is free software; you can redistribute it and/or modify it |
| 5 | # under the terms of the GNU Lesser General Public License as published by the |
| 6 | # Free Software Foundation; either version 2.1 of the License, or (at your |
| 7 | # option) any later version. |
| 8 | |
| 9 | # This library is distributed in the hope that it will be useful, but WITHOUT |
| 10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License |
| 12 | # for more details. |
| 13 | |
| 14 | # You should have received a copy of the GNU Lesser General Public License |
| 15 | # along with this library; if not, write to the Free Software Foundation, |
| 16 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 17 | """ |
| 18 | pyudev.tests.test_device |
| 19 | ======================== |
| 20 | |
| 21 | Test for devices. |
| 22 | |
| 23 | .. moduleauthor:: mulhern <[email protected]> |
| 24 | """ |
| 25 | |
| 26 | # isort: STDLIB |
| 27 | import gc |
| 28 | |
| 29 | from ._device_tests._attributes_tests import TestAttributes |
| 30 | from ._device_tests._device_tests import TestDevice |
| 31 | from ._device_tests._devices_tests import TestDevices # pylint: disable=unused-import |
| 32 | from ._device_tests._tags_tests import TestTags # pylint: disable=unused-import |
| 33 | |
| 34 | |
| 35 | def test_garbage(): |
| 36 | """ |
| 37 | Make sure that all the device tests create no uncollectable objects. |
| 38 | |
| 39 | This test must stick at the bottom of this test file to make sure that |
| 40 | ``py.test`` always executes it at last. |
| 41 | """ |
| 42 | assert not gc.garbage |