• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Red-M / RedSSH / 52347

pending completion
52347

push

coveralls-python

Red_M
Fix bug with pty argument to open a single use exec command channel. Add test for `redssh.RedSSH().execute_command()`. Version bump.

9 of 9 new or added lines in 4 files covered. (100.0%)

323 of 1605 relevant lines covered (20.12%)

0.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

37.5
/redssh/utils.py
1
# RedSSH
2
# Copyright (C) 2022 - 2022 Red_M ( http://bitbucket.com/Red_M )
3

4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
8

9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13

14
# You should have received a copy of the GNU General Public License along
15
# with this program; if not, write to the Free Software Foundation, Inc.,
16
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17

18

19
def repl_setattr(self, attr, value):
1✔
20
    setattr(getattr(self.obj, self.sub_obj), attr, value)
×
21

22
class ObjectProxy(object):
1✔
23
    def __init__(self, obj, sub_obj):
1✔
24
        self.obj = obj
×
25
        self.sub_obj = sub_obj
×
26
        self.____init____done____ = True
×
27

28
    def __getattr__(self, attr):
1✔
29
        return(getattr(getattr(self.obj, self.sub_obj), attr))
×
30

31
    def __setattr__(self, attr, value):
1✔
32
        if '____init____done____' in self.__dict__ and attr!='____init____done____' and attr!=repl_setattr:
×
33
            repl_setattr(self, attr, value)
×
34
            super().__setattr__('__setattr__', repl_setattr)
×
35
        else:
36
            super().__setattr__(attr, value)
×
37

38

39
def check_for_attr(self,attr):
1✔
40
    return(attr in self.__dict__)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc