Skip to content

test_expands_blank_panes and test_blank_pane_count failures #486

Open
@chutz

Description

@chutz

Step 1: Provide a summary of your problem

  • For general technical questions, problems or feature requests related to the code in this repository file an issue.

same on python3.6 and python3.7
tmux-2.9a
tmuxp-1.5.1
tmux-2.91
libtmux-0.8.1
bash-5.0.7

============================= test session starts ==============================
platform linux -- Python 3.6.8, pytest-4.4.1, py-1.5.4, pluggy-0.9.0 -- /usr/bin/python3.6
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/var/tmp/portage/app-misc/tmuxp-1.5.1/work/tmuxp-1.5.1/.hypothesis/examples')
rootdir: /var/tmp/portage/app-misc/tmuxp-1.5.1/work/tmuxp-1.5.1, inifile: setup.cfg
plugins: rerunfailures-7.0, cov-2.6.1, hypothesis-4.15.0
collecting ... collected 94 items

tests/test_cli.py::test_creates_config_dir_not_exists PASSED             [  1%]
tests/test_cli.py::test_in_dir_from_config_dir PASSED                    [  2%]
tests/test_cli.py::test_ignore_non_configs_from_current_dir PASSED       [  3%]
tests/test_cli.py::test_get_configs_cwd PASSED                           [  4%]
tests/test_cli.py::test_is_pure_name[.-False] PASSED                     [  5%]
tests/test_cli.py::test_is_pure_name[./-False] PASSED                    [  6%]
tests/test_cli.py::test_is_pure_name[-False] PASSED                      [  7%]
tests/test_cli.py::test_is_pure_name[.tmuxp.yaml-False] PASSED           [  8%]
tests/test_cli.py::test_is_pure_name[../.tmuxp.yaml-False] PASSED        [  9%]
tests/test_cli.py::test_is_pure_name[../-False] PASSED                   [ 10%]
tests/test_cli.py::test_is_pure_name[/hello/world-False] PASSED          [ 11%]
tests/test_cli.py::test_is_pure_name[~/.tmuxp/hey-False] PASSED          [ 12%]
tests/test_cli.py::test_is_pure_name[~/work/c/tmux/-False] PASSED        [ 13%]
tests/test_cli.py::test_is_pure_name[~/work/c/tmux/.tmuxp.yaml-False] PASSED [ 14%]
tests/test_cli.py::test_is_pure_name[myproject-True] PASSED              [ 15%]
tests/test_cli.py::test_tmuxp_configdir_env_var PASSED                   [ 17%]
tests/test_cli.py::test_resolve_dot PASSED                               [ 18%]
tests/test_cli.py::test_scan_config_arg PASSED                           [ 19%]
tests/test_cli.py::test_load_workspace PASSED                            [ 20%]
tests/test_cli.py::test_load_workspace_name_match_regression_252 PASSED  [ 21%]
tests/test_cli.py::test_load_symlinked_workspace PASSED                  [ 22%]
tests/test_cli.py::test_regression_00132_session_name_with_dots PASSED   [ 23%]
tests/test_cli.py::test_load_zsh_autotitle_warning[cli_args0] PASSED     [ 24%]
tests/test_cli.py::test_load_zsh_autotitle_warning[cli_args1] PASSED     [ 25%]
tests/test_cli.py::test_convert[cli_args0] PASSED                        [ 26%]
tests/test_cli.py::test_convert[cli_args1] PASSED                        [ 27%]
tests/test_cli.py::test_import[cli_args0] PASSED                         [ 28%]
tests/test_cli.py::test_import_teamocil[cli_args0-inputs0] PASSED        [ 29%]
tests/test_cli.py::test_import_teamocil[cli_args1-inputs1] PASSED        [ 30%]
tests/test_cli.py::test_import_teamocil[cli_args2-inputs2] PASSED        [ 31%]
tests/test_cli.py::test_import_tmuxinator[cli_args0-inputs0] PASSED      [ 32%]
tests/test_cli.py::test_import_tmuxinator[cli_args1-inputs1] PASSED      [ 34%]
tests/test_cli.py::test_import_tmuxinator[cli_args2-inputs2] PASSED      [ 35%]
tests/test_cli.py::test_get_abs_path PASSED                              [ 36%]
tests/test_cli.py::test_get_tmuxinator_dir PASSED                        [ 37%]
tests/test_cli.py::test_get_cwd PASSED                                   [ 38%]
tests/test_cli.py::test_get_teamocil_dir PASSED                          [ 39%]
tests/test_cli.py::test_validate_choices PASSED                          [ 40%]
tests/test_cli.py::test_pass_config_dir_ClickPath PASSED                 [ 41%]
tests/test_config.py::test_export_json PASSED                            [ 42%]
tests/test_config.py::test_export_yaml PASSED                            [ 43%]
tests/test_config.py::test_scan_config PASSED                            [ 44%]
tests/test_config.py::test_config_expand1 PASSED                         [ 45%]
tests/test_config.py::test_config_expand2 PASSED                         [ 46%]
tests/test_config.py::test_inline_config PASSED                          [ 47%]
tests/test_config.py::test_inheritance_config PASSED                     [ 48%]
tests/test_config.py::test_shell_command_before PASSED                   [ 50%]
tests/test_config.py::test_in_session_scope PASSED                       [ 51%]
tests/test_config.py::test_trickle_relative_start_directory PASSED       [ 52%]
tests/test_config.py::test_expands_blank_panes RERUN                     [ 53%]
tests/test_config.py::test_expands_blank_panes RERUN                     [ 53%]
tests/test_config.py::test_expands_blank_panes RERUN                     [ 53%]
tests/test_config.py::test_expands_blank_panes RERUN                     [ 53%]
tests/test_config.py::test_expands_blank_panes RERUN                     [ 53%]
tests/test_config.py::test_expands_blank_panes FAILED                    [ 53%]
tests/test_config.py::test_no_session_name PASSED                        [ 54%]
tests/test_config.py::test_no_windows PASSED                             [ 55%]
tests/test_config.py::test_no_window_name PASSED                         [ 56%]
tests/test_config.py::test_replaces_env_variables PASSED                 [ 57%]
tests/test_config_teamocil.py::test_config_to_dict[windows:\n- name: "sample-two-panes"\n  root: "~/Code/sample/www"\n  layout: even-horizontal\n  panes:\n    - cmd: ["pwd", "ls -la"]\n    - cmd: "rails server --port 3000"\n-teamocil_dict0-tmuxp_dict0] PASSED [ 58%]
tests/test_config_teamocil.py::test_config_to_dict[windows:\n- name: "sample-four-panes"\n  root: "~/Code/sample/www"\n  layout: tiled\n  panes:\n    - cmd: "pwd"\n    - cmd: "pwd"\n    - cmd: "pwd"\n    - cmd: "pwd"\n-teamocil_dict1-tmuxp_dict1] PASSED [ 59%]
tests/test_config_teamocil.py::test_config_to_dict[windows:\n- name: "my-first-window"\n  root: "~/Projects/foo-www"\n  layout: even-vertical\n  filters:\n    before: "rbenv local 2.0.0-p0"\n    after: "echo 'I am done initializing this pane.'"\n  panes:\n    - cmd: "git status"\n    - cmd: "bundle exec rails server --port 40"\n      focus: true\n    - cmd:\n      - "sudo service memcached start"\n      - "sudo service mongodb start"\n-teamocil_dict2-tmuxp_dict2] PASSED [ 60%]
tests/test_config_teamocil.py::test_config_to_dict[windows:\n- name: "erb-example"\n  root: <%= ENV['MY_PROJECT_ROOT'] %>\n  panes:\n    - cmd: "pwd"\n-teamocil_dict3-tmuxp_dict3] PASSED [ 61%]
tests/test_config_teamocil.py::test_multisession_config[two-windows-expected0] PASSED [ 62%]
tests/test_config_teamocil.py::test_multisession_config[two-windows-with-filters-expected1] PASSED [ 63%]
tests/test_config_teamocil.py::test_multisession_config[two-windows-with-custom-command-options-expected2] PASSED [ 64%]
tests/test_config_teamocil.py::test_multisession_config[three-windows-within-a-session-expected3] PASSED [ 65%]
tests/test_config_tmuxinator.py::test_config_to_dict[windows:\n- editor:\n    layout: main-vertical\n    panes:\n        - vim\n        - guard\n- server: bundle exec rails s\n- logs: tail -f logs/development.log\n-tmuxinator_dict0-tmuxp_dict0] PASSED [ 67%]
tests/test_config_tmuxinator.py::test_config_to_dict[project_name: sample\nproject_root: ~/test\nsocket_name: foo # Remove to use default socket\npre: sudo /etc/rc.d/mysqld start # Runs before everything\nrbenv: 2.0.0-p247\ncli_args: -f ~/.tmux.mac.conf # Pass arguments to tmux\ntabs:\n- editor:\n    pre:\n        - echo "I get run in each pane, before each pane command!"\n        -\n    layout: main-vertical\n    panes:\n        - vim\n        - #empty, will just run plain bash\n        - top\n- shell: git pull\n- guard:\n    layout: tiled\n    pre:\n        - echo "I get run in each pane."\n        - echo "Before each pane command!"\n    panes:\n        -\n        - #empty, will just run plain bash\n        -\n- database: bundle exec rails db\n- server: bundle exec rails s\n- logs: tail -f log/development.log\n- console: bundle exec rails c\n- capistrano:\n- server: ssh user@example.com\n-tmuxinator_dict1-tmuxp_dict1] PASSED [ 68%]
tests/test_config_tmuxinator.py::test_config_to_dict[# ~/.tmuxinator/sample.yml\n# you can make as many tabs as you wish...\n\nname: sample\nroot: ~/test\nsocket_name: foo # Remove to use default socket\npre: sudo /etc/rc.d/mysqld start # Runs before everything\npre_window: rbenv shell 2.0.0-p247 # Runs in each tab and pane\ntmux_options: -f ~/.tmux.mac.conf # Pass arguments to tmux\nwindows:\n- editor:\n    pre:\n        - echo "I get run in each pane, before each pane command!"\n        -\n    layout: main-vertical\n    root: ~/test/editor\n    panes:\n        - vim\n        - #empty, will just run plain bash\n        - top\n- shell:\n    - git pull\n    - git merge\n- guard:\n    layout: tiled\n    pre:\n        - echo "I get run in each pane."\n        - echo "Before each pane command!"\n    panes:\n        -\n        - #empty, will just run plain bash\n        -\n- database: bundle exec rails db\n- server: bundle exec rails s\n- logs: tail -f log/development.log\n- console: bundle exec rails c\n- capistrano:\n- server: ssh user@example.com\n-tmuxinator_dict2-tmuxp_dict2] PASSED [ 69%]
tests/test_util.py::test_raise_BeforeLoadScriptNotExists_if_not_exists PASSED [ 70%]
tests/test_util.py::test_raise_BeforeLoadScriptError_if_retcode PASSED   [ 71%]
tests/test_util.py::test_return_stdout_if_ok PASSED                      [ 72%]
tests/test_util.py::test_beforeload_returncode PASSED                    [ 73%]
tests/test_util.py::test_beforeload_returns_stderr_messages PASSED       [ 74%]
tests/test_workspacebuilder.py::test_split_windows PASSED                [ 75%]
tests/test_workspacebuilder.py::test_split_windows_three_pane PASSED     [ 76%]
tests/test_workspacebuilder.py::test_focus_pane_index PASSED             [ 77%]
tests/test_workspacebuilder.py::test_suppress_history SKIPPED            [ 78%]
tests/test_workspacebuilder.py::test_session_options PASSED              [ 79%]
tests/test_workspacebuilder.py::test_global_options PASSED               [ 80%]
tests/test_workspacebuilder.py::test_global_session_env_options PASSED   [ 81%]
tests/test_workspacebuilder.py::test_window_options PASSED               [ 82%]
tests/test_workspacebuilder.py::test_window_options_after PASSED         [ 84%]
tests/test_workspacebuilder.py::test_window_shell PASSED                 [ 85%]
tests/test_workspacebuilder.py::test_environment_variables PASSED        [ 86%]
tests/test_workspacebuilder.py::test_automatic_rename_option PASSED      [ 87%]
tests/test_workspacebuilder.py::test_blank_pane_count RERUN              [ 88%]
tests/test_workspacebuilder.py::test_blank_pane_count RERUN              [ 88%]
tests/test_workspacebuilder.py::test_blank_pane_count RERUN              [ 88%]
tests/test_workspacebuilder.py::test_blank_pane_count RERUN              [ 88%]
tests/test_workspacebuilder.py::test_blank_pane_count RERUN              [ 88%]
tests/test_workspacebuilder.py::test_blank_pane_count FAILED             [ 88%]
tests/test_workspacebuilder.py::test_start_directory PASSED              [ 89%]
tests/test_workspacebuilder.py::test_start_directory_relative PASSED     [ 90%]
tests/test_workspacebuilder.py::test_pane_order PASSED                   [ 91%]
tests/test_workspacebuilder.py::test_window_index PASSED                 [ 92%]
tests/test_workspacebuilder.py::test_before_load_throw_error_if_retcode_error PASSED [ 93%]
tests/test_workspacebuilder.py::test_before_load_throw_error_if_file_not_exists PASSED [ 94%]
tests/test_workspacebuilder.py::test_before_load_true_if_test_passes PASSED [ 95%]
tests/test_workspacebuilder.py::test_before_load_true_if_test_passes_with_args PASSED [ 96%]
tests/test_workspacefreezer.py::test_freeze_config PASSED                [ 97%]
tests/tests/test_helpers.py::test_kills_session PASSED                   [ 98%]
tests/tests/test_helpers.py::test_if_session_killed_before PASSED        [100%]

=================================== FAILURES ===================================
___________________________ test_expands_blank_panes ___________________________

    def test_expands_blank_panes():
        """Expand blank config into full form.
    
        Handle ``NoneType`` and 'blank'::
    
        # nothing, None, 'blank'
        'panes': [
            None,
            'blank'
        ]
    
        # should be blank
        'panes': [
            'shell_command': []
        ]
    
        Blank strings::
    
            panes: [
                ''
            ]
    
            # should output to:
            panes:
                'shell_command': ['']
    
        """
    
        yaml_config_file = os.path.join(example_dir, 'blank-panes.yaml')
>       test_config = load_config(yaml_config_file)

tests/test_config.py:268: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_config.py:25: in load_config
    return kaptan.Kaptan().import_config(_file).get()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <kaptan.Kaptan object at 0x7fefd55a7470>
value = '/var/tmp/portage/app-misc/tmuxp-1.5.1/work/tmuxp-1.5.1/examples/blank-panes.yaml'

    def import_config(self, value):
        if isinstance(value, dict):  # load python dict
            self.handler = self.HANDLER_MAP['dict']()
            data = value
        elif os.path.isfile(value) and not self._is_python_file(value):
            if not self.handler:
                try:
                    key = HANDLER_EXT.get(os.path.splitext(value)[1][1:], None)
                    self.handler = self.HANDLER_MAP[key]()
                except:
                    raise RuntimeError("Unable to determine handler")
            with open(value) as f:
                data = f.read()
        elif self._is_python_file(value):  # is a python file
            self.handler = self.HANDLER_MAP[HANDLER_EXT['py']]()
            if not value.endswith('.py'):
                value += '.py'  # in case someone is referring to a module
            data = os.path.abspath(os.path.expanduser(value))
            if not os.path.isfile(data):
                raise IOError('File {0} not found.'.format(data))
        else:
            if not self.handler:
>               raise RuntimeError("Unable to determine handler")
E               RuntimeError: Unable to determine handler

/usr/lib64/python3.6/site-packages/kaptan/__init__.py:87: RuntimeError
____________________________ test_blank_pane_count _____________________________

session = Session($1 libtmux_3pi4sry3)

    def test_blank_pane_count(session):
        """:todo: Verify blank panes of various types build into workspaces."""
        yaml_config_file = os.path.join(example_dir, 'blank-panes.yaml')
>       test_config = kaptan.Kaptan().import_config(yaml_config_file).get()

tests/test_workspacebuilder.py:409: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <kaptan.Kaptan object at 0x7fefd53436d8>
value = '/var/tmp/portage/app-misc/tmuxp-1.5.1/work/tmuxp-1.5.1/examples/blank-panes.yaml'

    def import_config(self, value):
        if isinstance(value, dict):  # load python dict
            self.handler = self.HANDLER_MAP['dict']()
            data = value
        elif os.path.isfile(value) and not self._is_python_file(value):
            if not self.handler:
                try:
                    key = HANDLER_EXT.get(os.path.splitext(value)[1][1:], None)
                    self.handler = self.HANDLER_MAP[key]()
                except:
                    raise RuntimeError("Unable to determine handler")
            with open(value) as f:
                data = f.read()
        elif self._is_python_file(value):  # is a python file
            self.handler = self.HANDLER_MAP[HANDLER_EXT['py']]()
            if not value.endswith('.py'):
                value += '.py'  # in case someone is referring to a module
            data = os.path.abspath(os.path.expanduser(value))
            if not os.path.isfile(data):
                raise IOError('File {0} not found.'.format(data))
        else:
            if not self.handler:
>               raise RuntimeError("Unable to determine handler")
E               RuntimeError: Unable to determine handler

/usr/lib64/python3.6/site-packages/kaptan/__init__.py:87: RuntimeError
========== 2 failed, 91 passed, 1 skipped, 10 rerun in 26.04 seconds ===========

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions