MirceaDan
c623e90ebc
chnaged teh default from binary to text mode
...
seams like open was defaulting to text mode, since now is specified in clear i made sure it matches with teh previous default
2018-12-01 17:43:19 -08:00
MirceaDan
b6e49b59a7
unitest update to decode utf8
...
TypeError: write() argument 1 must be unicode, not str
2018-12-01 17:11:07 -08:00
MirceaDan
347f53baa4
file must be open in text mode
...
those files must be opened in text mode in python3
2018-12-01 16:36:11 -08:00
MirceaDan
9ecf39febe
we need a list not a map object
...
AssertionError: Second sequence is not a list: <map object at 0x7f7b0d3811d0>
2018-12-01 16:26:43 -08:00
MirceaDan
ff0b94c78d
py23 compat: list is needed not a view
...
in py3 keys() returns a view but in this cases we need a list
2018-12-01 15:42:01 -08:00
MirceaDan
a5cff5bc3d
this file must be opened in text mode
...
the version file must be read in text mode
2018-12-01 12:19:30 -08:00
MirceaDan
6b149e2fc9
fixed unitests for io.open change
...
the fixups needed change to use io.open in mock
some io.open needed to be read as text
2018-12-01 11:57:10 -08:00
MirceaDan
337e49208a
py23 compat: using io.open instead of open
...
for python3 and python2 to work teh same io.open must be used for file handling
2018-11-30 00:32:57 -08:00
Gina Häußge
b052925424
Merge remote-tracking branch 'origin/devel' into devel
...
# Conflicts:
# tests/filemanager/test_filemanager.py
2018-11-28 17:37:47 +01:00
Gina Häußge
88c93a7c11
Merge branch 'maintenance' into devel
...
# Conflicts:
# setup.py
2018-11-13 16:22:07 +01:00
tedder
98c84b6bb9
fix test, match dict
2018-11-08 01:34:45 +00:00
Gina Häußge
e522633c98
Merge branch 'maintenance' into devel
...
# Conflicts:
# AUTHORS.md
# src/octoprint/plugins/pluginmanager/__init__.py
# src/octoprint/plugins/softwareupdate/__init__.py
# src/octoprint/server/__init__.py
# src/octoprint/server/api/__init__.py
# src/octoprint/server/util/flask.py
# src/octoprint/server/util/sockjs.py
# src/octoprint/server/util/tornado.py
# src/octoprint/static/js/app/client/base.js
# src/octoprint/users.py
2018-11-06 11:57:57 +01:00
Gina Häußge
3ad4818488
Use read instead of write mode in _load_yaml
2018-10-30 16:56:14 +01:00
Gina Häußge
169275b052
Fix wrong position of parentheses, add unit tests
2018-10-19 16:39:18 +02:00
Gina Häußge
ac2354907a
Remove some trailing whitespace
2018-10-18 17:33:08 +02:00
Gina Häußge
7b5d2e3e0c
Allow whitespace after : in M114 responses
...
Closes #2839
2018-10-18 17:32:32 +02:00
Gina Häußge
5ff790048d
Fix unit tests
2018-09-26 15:52:10 +02:00
tedder
743ff35bcf
add some yaml wrappers for the test environment
2018-09-22 18:05:10 -07:00
tedder
df706f61db
import locally for py3 mock compatability
2018-09-22 17:21:33 -07:00
tedder
22fdc1d933
final open mock tactic: add a central global.
2018-09-22 16:58:24 -07:00
tedder
aa383e3ca1
fix all __builtin__.open patch/mock calls
2018-09-22 16:15:22 -07:00
tedder
bd35de80c3
fix test_file_helpers, couldn't figureout a non-conditional way to do this
2018-09-22 15:55:19 -07:00
tedder
c2f09b1715
fixes to test_comm_helpers
2018-09-22 13:14:27 -07:00
Gina Häußge
10f3f72b9c
Unit tests: Fix duplicated test method
...
Closes #2805
2018-09-21 14:35:20 +02:00
Gina Häußge
1ccc1fa47b
Merge pull request #2807 from tedder/201809_py3_devel_prep_b
...
201809 py3 devel prep batch b
2018-09-21 12:20:44 +02:00
tedder
2972d38cef
use a number instead of a string for safe_dump
2018-09-18 08:54:58 -07:00
Gina Häußge
2c50aa789a
Merge branch 'pr/2733' into devel
...
# Conflicts:
# src/octoprint/plugins/discovery/__init__.py
2018-09-18 17:30:30 +02:00
Gina Häußge
a920c4fe21
Merge pull request #2806 from tedder/201809_rewrite_test_get_recovery
...
rewrite test_get_recovery_data
2018-09-18 17:12:27 +02:00
Gina Häußge
52468e7e1c
Merge pull request #2802 from tedder/201809_temperature_regex_update
...
201809 temperature regex update
2018-09-18 17:10:37 +02:00
Gina Häußge
75c801d63f
Unit tests for is_lan_address
...
Also fixed a bug in subnet creation in the process.
2018-09-04 14:01:31 +02:00
tedder
7867052339
another 'set equality', this one to fix map/list mappings
2018-09-02 00:44:30 -07:00
tedder
8a0252ccfe
add patch workaround for py2/py3
2018-09-02 00:16:06 -07:00
tedder
250e83ad7e
more specific asserts
...
This lets the testing framework show the test error better.
2018-09-01 22:32:47 -07:00
tedder
660724741c
quick refactor for deprecated 'assertEquals'
...
It's been quietly allowed but was dropped in py3.
2018-09-01 22:31:33 -07:00
tedder
a5f87597ad
refactor and upgrade tests
...
Some prepwork for py3. Tossing these together:
- assertItemsEqual doesn't do what it says on the box. It only said "hey, these lists have the same number of items". Not content or anything. Changing that to SetEqual, which is much closer to what is wanted- ensuring that lists have the same content without caring about their order.
- use assertRaises instead of try/catch
- update some mocks, especially mock_open.
- include the refactored test_get_recovery_data sent to the maintenance branch in #2806 .
2018-09-01 22:27:10 -07:00
tedder
8bf9b8650d
rewrite test_get_recovery_data
...
I was pulling my hair out with some py3 compatability, so .. I ended up basically rewriting it. Basically a big refactor, still compatible with py2.
2018-09-01 22:07:41 -07:00
tedder
d6da819cd6
add unit tests for temperature regexes
2018-09-01 10:46:29 -07:00
Gina Häußge
62120affae
PMGR: Finalize extraction of is_os_compatible into octoprint.util.platform
2018-08-17 14:13:01 +02:00
Gina Häußge
b83dd76c89
Merge branch 'maintenance' into devel
...
# Conflicts:
# src/octoprint/static/js/app/viewmodels/printerstate.js
2018-07-20 12:27:36 +02:00
Gina Häußge
a37165d7d9
Tracking: Fix unit tests
2018-07-19 18:25:16 +02:00
Gina Häußge
9e0e4bf7b6
Pi Support: Allow configuration of vcgencmd
2018-07-19 18:17:28 +02:00
Gina Häußge
1cff2581db
OctoPi support => Pi support
...
* changed model detection implementation to use device-tree
* now active if running on a Pi, regardless whether that runs OctoPi
or not
* detect undervoltage/overheat issues via vcgencmd and report back on
UI
2018-07-17 14:38:12 +02:00
Gina Häußge
fd4ff2bf37
Merge branch 'maintenance' into devel
...
# Conflicts:
# AUTHORS.md
# src/octoprint/plugin/__init__.py
# src/octoprint/server/__init__.py
# src/octoprint/server/api/__init__.py
# tests/timelapse/test_timelapse_helpers.py
2018-07-16 15:29:02 +02:00
sti2d
30359f52ab
In python 3, map/filter return specific object types that :
...
* are not directly iterable
* doesn't work with len() function
* doesn't allow list concatenation
This commit wraps all relevant map/filter outputs into a list object type
2018-07-14 09:22:27 +02:00
Gina Häußge
e224b0ac71
Fix & extend unit tests
2018-07-13 18:02:42 +02:00
Gina Häußge
7b773f6fd2
Merge branch 'maintenance' into devel
...
# Conflicts:
# setup.py
# src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js
# src/octoprint/templates/dialogs/settings/accesscontrol.jinja2
# src/octoprint/templates/sidebar/files_header.jinja2
2018-05-18 13:45:42 +02:00
Koen Kooi
5aef014773
unit tests: timelapse: add videocodec test
...
This test checks if both videocodec and container format have been set
correctly.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net >
2018-05-15 10:42:11 +02:00
Gina Häußge
bd7a28af5b
Fix unit test
2018-05-10 18:35:25 +02:00
Gina Häußge
104b0a504c
Merge branch 'pr/2586' into devel
...
# Conflicts:
# AUTHORS.md
# src/octoprint/server/util/sockjs.py
# src/octoprint/static/js/app/viewmodels/timelapse.js
2018-05-10 18:18:05 +02:00
Gina Häußge
8369d311bf
Small refactoring & fixed tests
2018-05-03 17:42:30 +02:00