File: disable-tests-requiring-local-runtime

package info (click to toggle)
python-uflash 1.2.4%2Bdfsg-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 316 kB
  • sloc: python: 773; makefile: 218; sh: 79
file content (99 lines) | stat: -rw-r--r-- 3,353 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Description: Disable tests requiring local MicroPython runtime
 The runtime is only guaranteed to be available when the
 firmware-microbit-micropython package is installed as a
 build dependency. When using the firmware-microbit-micropython-dl runtime
 downloader this is not the case.
Author: Nick Morrott <knowledgejunkie@gmail.com>
Forwarded: not-needed
Last-Update: 2018-12-28
---
--- a/tests/test_uflash.py
+++ b/tests/test_uflash.py
@@ -101,6 +101,7 @@
     assert uflash.hexlify('') == ''
 
 
+@pytest.mark.skip(reason="requires local MicroPython runtime")
 def test_embed_hex():
     """
     Ensure the good case works as expected.
@@ -139,6 +140,7 @@
     assert ex.value.args[0] == 'MicroPython runtime hex required.'
 
 
+@pytest.mark.skip(reason="requires local MicroPython runtime")
 def test_extract():
     """
     The script should be returned as a string (if there is one).
@@ -149,6 +151,7 @@
     assert extracted == TEST_SCRIPT.decode('utf-8')
 
 
+@pytest.mark.skip(reason="requires local MicroPython runtime")
 def test_extract_sandwiched():
     """
     The script hex is packed with additional data above and bellow and should
@@ -171,6 +174,7 @@
     assert uflash.extract_script('invalid input') == ''
 
 
+@pytest.mark.skip(reason="requires local MicroPython runtime")
 def test_extract_no_python():
     """
     Ensure that if there's no Python in the input hex then just return an empty
@@ -284,6 +288,7 @@
     assert ex.value.args[0] == 'OS "foo" not supported.'
 
 
+@pytest.mark.skip(reason="requires local MicroPython runtime")
 def test_save_hex():
     """
     Ensure the good case works.
@@ -322,6 +327,7 @@
     assert ex.value.args[0] == 'The path to flash must be for a .hex file.'
 
 
+@pytest.mark.skip(reason="requires local MicroPython runtime")
 def test_flash_no_args():
     """
     The good case with no arguments to the flash() function. When it's
@@ -339,6 +345,7 @@
             assert mock_save.call_args[0][1] == expected_path
 
 
+@pytest.mark.skip(reason="requires local MicroPython runtime")
 def test_flash_has_python_no_path_to_microbit():
     """
     The good case with a path to a Python file. When it's possible to find a
@@ -360,6 +367,7 @@
             assert mock_save.call_args[0][1] == expected_path
 
 
+@pytest.mark.skip(reason="requires local MicroPython runtime")
 def test_flash_with_path_to_multiple_microbits():
     """
     Flash the referenced paths to the micro:bit with a hex file generated from
@@ -383,6 +391,7 @@
         assert mock_save.call_args_list[1][0][1] == expected_path
 
 
+@pytest.mark.skip(reason="requires local MicroPython runtime")
 def test_flash_with_path_to_microbit():
     """
     Flash the referenced path to the micro:bit with a hex file generated from
@@ -419,6 +428,7 @@
                     mock_save.assert_called_once_with('foo', expected_hex_path)
 
 
+@pytest.mark.skip(reason="requires local MicroPython runtime")
 def test_flash_with_python_script():
     """
     If a byte representation of a Python script is passed into the function it
@@ -432,6 +442,7 @@
                 mock_hexlify.assert_called_once_with(python_script, False)
 
 
+@pytest.mark.skip(reason="requires local MicroPython runtime")
 def test_flash_cannot_find_microbit():
     """
     Ensure an IOError is raised if it is not possible to find the micro:bit.