This repository has been archived by the owner on Jan 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2015-2019 Peter Magnusson <[email protected]> | ||
import unittest | ||
from nodemcu_uploader.utils import default_port | ||
from nodemcu_uploader.serialutils import default_port | ||
from nodemcu_uploader import __version__ | ||
import os | ||
|
||
|
@@ -19,9 +19,9 @@ def test_default_port(self): | |
self.assertEqual(default_port(), os.environ['SERIALPORT']) | ||
else: | ||
# Test as if it were given system | ||
self.assertEqual(default_port('Linux'), '/dev/ttyUSB0') | ||
self.assertEqual(default_port('Windows'), 'COM1') | ||
self.assertEqual(default_port('Darwin'), '/dev/tty.SLAB_USBtoUART') | ||
self.assertEqual(default_port('Linux', False), '/dev/ttyUSB0') | ||
self.assertEqual(default_port('Windows', False), 'COM1') | ||
self.assertEqual(default_port('Darwin', False), '/dev/tty.SLAB_USBtoUART') | ||
|
||
def test_remote_path_validation(self): | ||
validate.remotePath("test/something/maximum/len.jpeg") | ||
|
@@ -30,5 +30,5 @@ def test_remote_path_validation(self): | |
def v(p): | ||
validate.remotePath(p) | ||
|
||
self.assertRaises(exceptions.PathLengthException, (lambda: v("test/something/maximum/leng.jpeg"))) | ||
self.assertRaises(exceptions.PathLengthException, (lambda: v(""))) | ||
self.assertRaises(exceptions.ValidationException, (lambda: v("test/something/maximum/leng.jpeg"))) | ||
self.assertRaises(exceptions.ValidationException, (lambda: v(""))) |