Skip to content

Commit c8fef09

Browse files
author
Vasil Chimev
authored
Merge pull request #69 from NativeScript/vchimev-backup
Fix strerr output tests
2 parents 04112c7 + 65dbc06 commit c8fef09

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

core/settings/strings.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@
1818
# Commands
1919
autocomplete = "autocomplete"
2020
autocompletion = "Autocompletion"
21-
emulate = "emulate"
2221
errorreporting = "error-reporting"
2322
error_reporting = "Error reporting"
2423
usage_reporting = "Usage reporting"
2524
restart_shell = "Restart your shell to {0} command auto-completion."
2625

27-
2826
# Info
2927
enabled = "{0} is {1}enabled."
3028
disabled = "{0} is {1}disabled."

tests/build/common/stderr_output_tests.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
"""
2-
Tests redirecting error log and command options validations.
2+
Tests for error output.
33
"""
44

5+
import time
6+
7+
from core.base_class.BaseClass import BaseClass
58
from core.osutils.file import File
9+
from core.settings.strings import invalid, invalid_input, invalid_option
610
from core.tns.tns import Tns
7-
from core.base_class.BaseClass import BaseClass
8-
from core.settings.strings import *
9-
import time
1011

1112

12-
class OutputStderrTests(BaseClass):
13+
class StderrOutputTests(BaseClass):
1314
def tearDown(self):
1415
print ""
1516
print "{0} ____________________________________TEST END____________________________________". \
1617
format(time.strftime("%X"))
1718
print ""
1819

19-
def test_001_output_strerr(self):
20+
def test_001_redirect_strerr_output_to_file(self):
2021
File.remove('./stderr.txt')
21-
output = Tns.run_tns_command(run + " " + invalid, attributes={" 2> stderr.txt ": ""})
22-
assert invalid_input.format(run) in output
22+
output = Tns.run_tns_command("run " + invalid, attributes={" 2> stderr.txt ": ""})
23+
assert invalid_input.format("run") in output
2324

2425
def test_002_command_option_validation(self):
2526
output = Tns.run_tns_command("create " + self.app_name, attributes={"--" + invalid: "tns-app"})

0 commit comments

Comments
 (0)