laike9m / pdir2

Pretty dir() printing with joy:beer:
MIT License
1.33k stars 47 forks source link

minimum pytest version? #30

Closed carlwgeorge closed 7 years ago

carlwgeorge commented 7 years ago

There are multiple test failures when using pytest 2 (Fedora 25), but they all pass when using pytest 3 (Fedora 26). Can you confirm if the test require pytest>=3?

laike9m commented 7 years ago

That's interesting. Could you post the log of testing with pytest 2? I'll test it myself tonight.

laike9m commented 7 years ago

And does pdir2 work normally in Fedora 25?

carlwgeorge commented 7 years ago
Fedora 25, Python 2.7.13 ``` [root@f25 pdir2-0.2.0]# py.test-2.7 --version This is pytest version 2.9.2, imported from /usr/lib/python2.7/site-packages/pytest.pyc [root@f25 pdir2-0.2.0]# py.test-2.7 -vv ===================================================================================== test session starts ====================================================================================== platform linux2 -- Python 2.7.13, pytest-2.9.2, py-1.4.34, pluggy-0.3.1 -- /usr/bin/python2 cachedir: .cache rootdir: /root/pdir2-0.2.0, inifile: collected 21 items tests/test_buggy_attrs.py::test_dataframe PASSED tests/test_buggy_attrs.py::test_type PASSED tests/test_buggy_attrs.py::test_list PASSED tests/test_buggy_attrs.py::test_descriptor PASSED tests/test_container.py::test_acting_like_a_list PASSED tests/test_container.py::test_acting_like_a_list_when_search PASSED tests/test_container.py::test_attr_order PASSED tests/test_pdir_format.py::test_pdir_module PASSED tests/test_pdir_format.py::test_pdir_object PASSED tests/test_pdir_format.py::test_pdir_class PASSED tests/test_pdir_format.py::test_dir_without_argument PASSED tests/test_search.py::test_search_without_argument PASSED tests/test_search.py::test_search_with_argument PASSED tests/test_z_config.py::test_default_env_without_config ERROR tests/test_z_config.py::test_set_env_without_config ERROR tests/test_z_config.py::test_read_config ERROR tests/test_z_config.py::test_read_config_from_custom_location ERROR tests/test_z_config.py::test_uniform_color ERROR tests/test_z_config.py::test_empty_config ERROR tests/test_z_config.py::test_invalid_config_1 ERROR tests/test_z_config.py::test_invalid_config_2 ERROR ============================================================================================ ERRORS ============================================================================================ ______________________________________________________________________ ERROR at setup of test_default_env_without_config _______________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 ________________________________________________________________________ ERROR at setup of test_set_env_without_config _________________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 ______________________________________________________________________________ ERROR at setup of test_read_config ______________________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 ___________________________________________________________________ ERROR at setup of test_read_config_from_custom_location ____________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 _____________________________________________________________________________ ERROR at setup of test_uniform_color _____________________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 _____________________________________________________________________________ ERROR at setup of test_empty_config ______________________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 ___________________________________________________________________________ ERROR at setup of test_invalid_config_1 ____________________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 ___________________________________________________________________________ ERROR at setup of test_invalid_config_2 ____________________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 ============================================================================== 13 passed, 8 error in 0.38 seconds ============================================================================== ```
Fedora 25, Python 3.5.3 ``` [root@f25 pdir2-0.2.0]# py.test-3.5 --version This is pytest version 2.9.2, imported from /usr/lib/python3.5/site-packages/pytest.py [root@f25 pdir2-0.2.0]# py.test-3.5 -vv ===================================================================================== test session starts ====================================================================================== platform linux -- Python 3.5.3, pytest-2.9.2, py-1.4.34, pluggy-0.3.1 -- /usr/bin/python3 cachedir: .cache rootdir: /root/pdir2-0.2.0, inifile: collected 21 items tests/test_buggy_attrs.py::test_dataframe PASSED tests/test_buggy_attrs.py::test_type PASSED tests/test_buggy_attrs.py::test_list PASSED tests/test_buggy_attrs.py::test_descriptor PASSED tests/test_container.py::test_acting_like_a_list PASSED tests/test_container.py::test_acting_like_a_list_when_search PASSED tests/test_container.py::test_attr_order PASSED tests/test_pdir_format.py::test_pdir_module PASSED tests/test_pdir_format.py::test_pdir_object PASSED tests/test_pdir_format.py::test_pdir_class FAILED tests/test_pdir_format.py::test_dir_without_argument PASSED tests/test_search.py::test_search_without_argument PASSED tests/test_search.py::test_search_with_argument PASSED tests/test_z_config.py::test_default_env_without_config ERROR tests/test_z_config.py::test_set_env_without_config ERROR tests/test_z_config.py::test_read_config ERROR tests/test_z_config.py::test_read_config_from_custom_location ERROR tests/test_z_config.py::test_uniform_color ERROR tests/test_z_config.py::test_empty_config ERROR tests/test_z_config.py::test_invalid_config_1 ERROR tests/test_z_config.py::test_invalid_config_2 ERROR ============================================================================================ ERRORS ============================================================================================ ______________________________________________________________________ ERROR at setup of test_default_env_without_config _______________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 ________________________________________________________________________ ERROR at setup of test_set_env_without_config _________________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 ______________________________________________________________________________ ERROR at setup of test_read_config ______________________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 ___________________________________________________________________ ERROR at setup of test_read_config_from_custom_location ____________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 _____________________________________________________________________________ ERROR at setup of test_uniform_color _____________________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 _____________________________________________________________________________ ERROR at setup of test_empty_config ______________________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 ___________________________________________________________________________ ERROR at setup of test_invalid_config_1 ____________________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 ___________________________________________________________________________ ERROR at setup of test_invalid_config_2 ____________________________________________________________________________ pytest.fixture functions cannot use ``yield``. Instead write and return an inner function/generator and let the consumer call and iterate over it.: @pytest.fixture def clean(): DEFAULT_CONFIG_FILE = os.path.join(os.path.expanduser("~"), '.pdir2config') yield DEFAULT_CONFIG_FILE if 'PDIR2_CONFIG_FILE' in os.environ: if os.path.exists(os.environ['PDIR2_CONFIG_FILE']): os.remove(os.environ['PDIR2_CONFIG_FILE']) del os.environ['PDIR2_CONFIG_FILE'] if os.path.exists(DEFAULT_CONFIG_FILE): os.remove(DEFAULT_CONFIG_FILE) for module in ('pdir', 'pdir.api', 'pdir.constants', 'pdir.format', 'pdir.configuration', 'pdir.color', 'pdir.utils'): try: del modules[module] except KeyError: pass /root/pdir2-0.2.0/tests/test_z_config.py:18 =========================================================================================== FAILURES =========================================================================================== _______________________________________________________________________________________ test_pdir_class ________________________________________________________________________________________ def test_pdir_class(): class T(object): pass result = pdir(T) if sys.version[0] == '2': assert result.repr_str == repr(result) == '\n'.join([ '\x1b[0;33mabstract class:\x1b[0m', ' \x1b[0;36m__subclasshook__\x1b[0m', '\x1b[0;33mattribute access:\x1b[0m', ( ' \x1b[0;36m__delattr__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__getattribute__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__setattr__\x1b[0m'), '\x1b[0;33mobject customization:\x1b[0m', ( ' \x1b[0;36m__format__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__hash__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__init__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__new__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__repr__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__sizeof__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__str__\x1b[0m'), '\x1b[0;33mpickle:\x1b[0m', ( ' \x1b[0;36m__reduce__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__reduce_ex__\x1b[0m'), '\x1b[0;33mspecial attribute:\x1b[0m', ( ' \x1b[0;36m__class__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__dict__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__doc__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__module__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__weakref__\x1b[0m') ]) else: > assert result.repr_str == repr(result) == '\n'.join([ '\x1b[0;33mabstract class:\x1b[0m', ' \x1b[0;36m__subclasshook__\x1b[0m', '\x1b[0;33mattribute access:\x1b[0m', ( ' \x1b[0;36m__delattr__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__dir__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__getattribute__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__setattr__\x1b[0m'), '\x1b[0;33mclass customization:\x1b[0m', ' \x1b[0;36m__init_subclass__\x1b[0m', '\x1b[0;33mobject customization:\x1b[0m', ( ' \x1b[0;36m__format__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__hash__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__init__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__new__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__repr__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__sizeof__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__str__\x1b[0m'), '\x1b[0;33mpickle:\x1b[0m', ( ' \x1b[0;36m__reduce__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__reduce_ex__\x1b[0m'), '\x1b[0;33mrich comparison:\x1b[0m', ( ' \x1b[0;36m__eq__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__ge__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__gt__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__le__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__lt__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__ne__\x1b[0m'), '\x1b[0;33mspecial attribute:\x1b[0m', ( ' \x1b[0;36m__class__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__dict__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__doc__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__module__\x1b[0m\x1b[1;30m, ' '\x1b[0m\x1b[0;36m__weakref__\x1b[0m') ]) E assert '\x1b[0;33mab...kref__\x1b[0m' == '\x1b[0;33mabs...kref__\x1b[0m' E abstract class: E __subclasshook__ E attribute access: E __delattr__, __dir__, __getattribute__, __setattr__ E + class customization: E + __init_subclass__ E object customization: E __format__, __hash__, __init__, __new__, __repr__, __sizeof__, __str__ E pickle: E __reduce__, __reduce_ex__ E rich comparison: E __eq__, __ge__, __gt__, __le__, __lt__, __ne__ E special attribute: E __class__, __dict__, __doc__, __module__, __weakref__ tests/test_pdir_format.py:90: AssertionError ========================================================================= 1 failed, 12 passed, 8 error in 0.48 seconds ========================================================================= ```
Fedora 26, Python 2.7.13 ``` [root@f26 pdir2-0.2.0]# py.test-2.7 --version This is pytest version 3.1.1, imported from /usr/lib/python2.7/site-packages/pytest.pyc [root@f26 pdir2-0.2.0]# py.test-2.7 -vv ===================================================================================== test session starts ====================================================================================== platform linux2 -- Python 2.7.13, pytest-3.1.1, py-1.4.34, pluggy-0.4.0 -- /usr/bin/python2 cachedir: .cache rootdir: /root/pdir2-0.2.0, inifile: collected 21 items tests/test_buggy_attrs.py::test_dataframe PASSED tests/test_buggy_attrs.py::test_type PASSED tests/test_buggy_attrs.py::test_list PASSED tests/test_buggy_attrs.py::test_descriptor PASSED tests/test_container.py::test_acting_like_a_list PASSED tests/test_container.py::test_acting_like_a_list_when_search PASSED tests/test_container.py::test_attr_order PASSED tests/test_pdir_format.py::test_pdir_module PASSED tests/test_pdir_format.py::test_pdir_object PASSED tests/test_pdir_format.py::test_pdir_class PASSED tests/test_pdir_format.py::test_dir_without_argument PASSED tests/test_search.py::test_search_without_argument PASSED tests/test_search.py::test_search_with_argument PASSED tests/test_z_config.py::test_default_env_without_config PASSED tests/test_z_config.py::test_set_env_without_config PASSED tests/test_z_config.py::test_read_config PASSED tests/test_z_config.py::test_read_config_from_custom_location PASSED tests/test_z_config.py::test_uniform_color PASSED tests/test_z_config.py::test_empty_config PASSED tests/test_z_config.py::test_invalid_config_1 PASSED tests/test_z_config.py::test_invalid_config_2 PASSED ================================================================================== 21 passed in 0.37 seconds =================================================================================== ```
Fedora 26, Python 3.6.1 ``` [root@f26 pdir2-0.2.0]# py.test-3.6 --version This is pytest version 3.1.1, imported from /usr/lib/python3.6/site-packages/pytest.py [root@f26 pdir2-0.2.0]# py.test-3.6 -vv ===================================================================================== test session starts ====================================================================================== platform linux -- Python 3.6.1, pytest-3.1.1, py-1.4.34, pluggy-0.4.0 -- /usr/bin/python3 cachedir: .cache rootdir: /root/pdir2-0.2.0, inifile: collected 21 items tests/test_buggy_attrs.py::test_dataframe PASSED tests/test_buggy_attrs.py::test_type PASSED tests/test_buggy_attrs.py::test_list PASSED tests/test_buggy_attrs.py::test_descriptor PASSED tests/test_container.py::test_acting_like_a_list PASSED tests/test_container.py::test_acting_like_a_list_when_search PASSED tests/test_container.py::test_attr_order PASSED tests/test_pdir_format.py::test_pdir_module PASSED tests/test_pdir_format.py::test_pdir_object PASSED tests/test_pdir_format.py::test_pdir_class PASSED tests/test_pdir_format.py::test_dir_without_argument PASSED tests/test_search.py::test_search_without_argument PASSED tests/test_search.py::test_search_with_argument PASSED tests/test_z_config.py::test_default_env_without_config PASSED tests/test_z_config.py::test_set_env_without_config PASSED tests/test_z_config.py::test_read_config PASSED tests/test_z_config.py::test_read_config_from_custom_location PASSED tests/test_z_config.py::test_uniform_color PASSED tests/test_z_config.py::test_empty_config PASSED tests/test_z_config.py::test_invalid_config_1 PASSED tests/test_z_config.py::test_invalid_config_2 PASSED ================================================================================== 21 passed in 0.46 seconds =================================================================================== ```
carlwgeorge commented 7 years ago

Yes, pdir2 itself seems to work fine on Fedora 25 under both Python 2 and 3. The issues I'm having are limited to the test suite, which I would like to run during an RPM build. I'm working on submitting your module to the main Fedora repos.

laike9m commented 7 years ago

Cool, thank you very much! I see what the problem is, I'll fix them soon.

laike9m commented 7 years ago

Everything should be able to work now. Let me know if it fixes those issues.

carlwgeorge commented 7 years ago

Yes, with those commits all test now pass on Fedora 25 (Python 2.7.13 and 3.5.3, pytest 2.9.2) and Fedora 26 (Python 2.7.13 and 3.6.1, pytest 3.1.1). Thanks! I also did a build on RHEL 7 (Python 2.7.5, pytest 2.7.0) and they all pass on that platform as well.

Next I'll be submitting my spec file to Fedora so users can just dnf install (or yum install on RHEL) your module. I can submit the current version with those commits as patches, or just wait for you to tag a new release and submit that instead. Either way is fine by me.

laike9m commented 7 years ago

I'll make a release tonight.

On Mon, Jul 3, 2017 at 2:57 AM Carl George notifications@github.com wrote:

Yes, with those commits all test now pass on Fedora 25 (Python 2.7.13 and 3.5.3, pytest 2.9.2) and Fedora 26 (Python 2.7.13 and 3.6.1, pytest 3.1.1). Thanks! I also did a build on RHEL 7 (Python 2.7.5, pytest 2.7.0) and they all pass on that platform as well.

Next I'll be submitting my spec file to Fedora so users can just dnf install (or yum install on RHEL) your module. I can submit the current version with those commits as patches, or just wait for you to tag a new release and submit that instead. Either way is fine by me.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/laike9m/pdir2/issues/30#issuecomment-312510190, or mute the thread https://github.com/notifications/unsubscribe-auth/ACeNzbMGxk9fs8ezlHZigWsFkQefTXI2ks5sJ-gdgaJpZM4OJ5iL .

laike9m commented 7 years ago

Done.