Skip to content

Commit e5cab38

Browse files
committed
Add unittests, written with AI
1 parent d34fe08 commit e5cab38

6 files changed

Lines changed: 1054 additions & 12 deletions

File tree

changes/365.added

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Added the remote file copy feature to Arista EOS devices.
1+
Added the remote file copy feature to Arista EOS devices.
2+
Added unittests for remote file copy on Arista EOS devices.

poetry.lock

Lines changed: 48 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyntc/devices/eos_device.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,6 @@ def file_copy_remote_exists(self, src, dest=None, file_system=None):
423423
log.debug("Host %s: File %s does not already exist on remote.", self.host, src)
424424
return False
425425

426-
###
427-
# MM Begin
428-
###
429426
def check_file_exists(self, filename, file_system=None):
430427
"""Check if a remote file exists by filename.
431428
@@ -687,10 +684,6 @@ def verify_file(self, checksum, filename, hashing_algorithm="md5", **kwargs):
687684
)
688685
return False
689686

690-
###
691-
# MM End
692-
###
693-
694687
def install_os(self, image_name, **vendor_specifics):
695688
"""Install new OS on device.
696689

pyntc/log.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def init(**kwargs):
4343
4444
4545
"""
46-
host = kwargs.pop("host", None)
4746
_debug = os.environ.get("PYNTC_DEBUG", None)
4847
log_format = DEBUG_FORMAT if _debug else FORMAT
4948

@@ -55,7 +54,7 @@ def init(**kwargs):
5554

5655
logging.basicConfig(**kwargs)
5756
# info is defined at the end of the file
58-
info("Logging initialized for host %s.", host)
57+
info("Logging initialized for host %s.", kwargs.pop("host", None))
5958

6059

6160
def logger(level):

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ attrs = "^23.2.0"
5151
towncrier = ">=23.6.0,<=24.8.0"
5252
ruff = "*"
5353
Markdown = "*"
54+
hypothesis = "*"
5455

5556
[tool.poetry.group.docs.dependencies]
5657
# Rendering docs to HTML

0 commit comments

Comments
 (0)