Skip to content

Commit b68eb40

Browse files
committed
Update linting configuration and remove unnecessary skip conditions for Windows
1 parent a6e6f62 commit b68eb40

10 files changed

Lines changed: 5 additions & 39 deletions

‎.gitattibutes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.approved.txt text eol=lf

‎utest/test/api/approved_files/PluginDocumentation.test_many_plugins.approved.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,18 +528,18 @@ Example project for translation can be found from
528528
[https://github.com/MarketSquare/robotframework-seleniumlibrary-translation-fi | robotframework-seleniumlibrary-translation-fi]
529529
repository.
530530

531-
= Plugin: my_lib =
531+
= Plugin: MyLib =
532532

533533
Some dummy documentation.
534534

535-
= my_lib Heading 1 =
535+
= MyLib Heading 1 =
536536

537537
This is heading 1 documentation.
538538

539-
== my_lib Heading 2 ==
539+
== MyLib Heading 2 ==
540540

541541
This is heading 2 documentation.
542542

543-
= Plugin: my_lib_args =
543+
= Plugin: MyLibArgs =
544544

545545
No plugin documentation found.

‎utest/test/api/test_filepath_unusual_characters.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def reporter():
2121
return factory.get_first_working()
2222

2323

24-
@pytest.mark.skipif(WINDOWS, reason="ApprovalTest do not support different line feeds")
2524
def test_normal_file_path(reporter):
2625
results = []
2726
results.append(_format_path("/foo/file.log", 1))

‎utest/test/api/test_plugin_documentation.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,16 @@ def setUp(self):
3030
factory.get_first_working(), PythonNativeReporter()
3131
)
3232

33-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
3433
def test_many_plugins(self):
3534
sl = SeleniumLibrary(
3635
plugins=f"{self.plugin_1}, {self.plugin_3};arg1=Text1;arg2=Text2"
3736
)
3837
verify(sl.get_keyword_documentation("__intro__"), self.reporter)
3938

40-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
4139
def test_parse_plugin_init_doc(self):
4240
sl = SeleniumLibrary(plugins=f"{self.plugin_3};arg1=Text1;arg2=Text2")
4341
verify(sl.get_keyword_documentation("__init__"), self.reporter)
4442

45-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
4643
def test_parse_plugin_kw_doc(self):
4744
sl = SeleniumLibrary(plugins=f"{self.plugin_3};arg1=Text1;arg2=Text2")
4845
verify(sl.get_keyword_documentation("execute_javascript"), self.reporter)

‎utest/test/keywords/test_firefox_profile_parsing.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def setUpClass(cls):
2727
def setUp(self):
2828
self.results = []
2929

30-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
3130
def test_single_method(self):
3231
self._parse_result(
3332
self.creator._get_ff_profile('set_preference("key1", "arg1")')

‎utest/test/keywords/test_javascript.py‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
class JavaScriptKeywordsTest(unittest.TestCase):
1414
@classmethod
15-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
1615
def setUpClass(cls):
1716
cls.code_examples = [
1817
(),
@@ -40,13 +39,11 @@ def setUpClass(cls):
4039
factory.load(reporter_json)
4140
cls.reporter = factory.get_first_working()
4241

43-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
4442
def test_get_javascript(self):
4543
code, args = self.js._get_javascript_to_execute(("code", "here"))
4644
result = f"{code} + {args}"
4745
verify(result, self.reporter)
4846

49-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
5047
def test_get_javascript_no_code(self):
5148
code = ("ARGUMENTS", "arg1", "arg1")
5249
try:
@@ -55,21 +52,18 @@ def test_get_javascript_no_code(self):
5552
result = str(error)
5653
verify(result, self.reporter)
5754

58-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
5955
def test_separate_code_and_args(self):
6056
all_results = []
6157
for code in self.code_examples:
6258
all_results.append(self.js_reporter(code))
6359
verify_all("code and args", all_results, reporter=self.reporter)
6460

65-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
6661
def test_indexing(self):
6762
all_results = []
6863
for code in self.code_examples:
6964
all_results.append(self.js._get_marker_index(code))
7065
verify_all("index", all_results, reporter=self.reporter)
7166

72-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
7367
def test_check_marker_error(self):
7468
examples = [
7569
(),

‎utest/test/keywords/test_press_keys.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def setUp(self):
2424
factory.load(reporter_json)
2525
self.reporter = factory.get_first_working()
2626

27-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
2827
def test_parse_keys(self):
2928
results = []
3029
results.append(self.element_keywords._parse_keys("A", "B", "C"))
@@ -41,7 +40,6 @@ def test_parse_keys(self):
4140
results.append(self.element_keywords._parse_keys("IS", "ALT", "HERE"))
4241
verify_all("index", results, reporter=self.reporter)
4342

44-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
4543
def test_parse_keys_aliases(self):
4644
results = []
4745
results.append(self.element_keywords._parse_aliases("CTRL"))
@@ -51,7 +49,6 @@ def test_parse_keys_aliases(self):
5149
results.append(self.element_keywords._parse_aliases("END"))
5250
verify_all("Alias testing", results, reporter=self.reporter)
5351

54-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
5552
def test_separate_key(self):
5653
results = []
5754
results.append(self.element_keywords._separate_key("BB"))
@@ -65,7 +62,6 @@ def test_separate_key(self):
6562
results.append(self.element_keywords._separate_key("+++"))
6663
verify_all("Separate key", results, reporter=self.reporter)
6764

68-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
6965
def test_convert_key(self):
7066
results = []
7167
results.append(self.element_keywords._convert_special_keys(["B"]))

‎utest/test/keywords/test_selenium_options_parser.py‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def teardown_function():
3333
unstub()
3434

3535

36-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
3736
def test_parse_options_string(options, reporter):
3837
results = []
3938
results.append(options._parse('method("arg1")'))
@@ -72,7 +71,6 @@ def test_parse_options_string(options, reporter):
7271
verify_all("Selenium options string to dict", results, reporter=reporter)
7372

7473

75-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
7674
def test_index_of_separator(options, reporter):
7775
results = []
7876
results.append(options._get_arument_index('method({"key": "value"})'))
@@ -82,7 +80,6 @@ def test_index_of_separator(options, reporter):
8280
verify_all("Get argument index", results, reporter=reporter)
8381

8482

85-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
8683
def test_parse_complex_object(options, reporter):
8784
results = []
8885
results.append(options._parse_to_tokens('method({"key": "value"})'))
@@ -92,7 +89,6 @@ def test_parse_complex_object(options, reporter):
9289
verify_all("Parse complex Python object", results, reporter=reporter)
9390

9491

95-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
9692
def test_parse_arguemnts(options, reporter):
9793
results = []
9894
results.append(options._parse_arguments(("arg1",), True))
@@ -103,7 +99,6 @@ def test_parse_arguemnts(options, reporter):
10399
verify_all("Parse arguments from complex object", results, reporter=reporter)
104100

105101

106-
@pytest.mark.skipif(WINDOWS, reason="ApprovalTest do not support different line feeds")
107102
@pytest.mark.skipif(sys.version_info > (3, 11), reason="Errors change with Python 3.12")
108103
def test_parse_options_string_errors(options, reporter):
109104
results = []
@@ -116,7 +111,6 @@ def test_parse_options_string_errors(options, reporter):
116111
verify_all("Selenium options string errors", results, reporter=reporter)
117112

118113

119-
@pytest.mark.skipif(WINDOWS, reason="ApprovalTest do not support different line feeds")
120114
@pytest.mark.skipif(sys.version_info < (3, 12), reason="Errors change with Python 3.12")
121115
def test_parse_options_string_errors_py3_12(options, reporter):
122116
results = []
@@ -129,7 +123,6 @@ def test_parse_options_string_errors_py3_12(options, reporter):
129123
verify_all("Selenium options string errors", results, reporter=reporter)
130124

131125

132-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
133126
def test_split_options(options, reporter):
134127
results = []
135128
results.append(options._split('method("arg1");method("arg2")'))
@@ -143,7 +136,6 @@ def test_split_options(options, reporter):
143136
verify_all("Selenium options string splitting", results, reporter=reporter)
144137

145138

146-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
147139
def test_options_create(options, reporter):
148140
results = []
149141
options_str = 'add_argument("--disable-dev-shm-usage")'
@@ -175,15 +167,13 @@ def test_options_create(options, reporter):
175167
verify_all("Selenium options", results, reporter=reporter)
176168

177169

178-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
179170
def test_get_options(options, reporter):
180171
options_str = 'add_argument("--proxy-server=66.97.38.58:80")'
181172
sel_options = options.create("chrome", options_str)
182173
results = [sel_options.arguments]
183174
verify_all("Selenium options with string.", results, reporter=reporter)
184175

185176

186-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
187177
def test_importer(options, reporter):
188178
results = []
189179
results.append(options._import_options("firefox"))

‎utest/test/keywords/test_selenium_service_parser.py‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def teardown_function():
3232
unstub()
3333

3434

35-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
3635
def test_parse_service_string(service, reporter):
3736
results = []
3837
results.append(service._parse('attribute="arg1"'))
@@ -53,9 +52,6 @@ def test_parse_service_string(service, reporter):
5352
verify_all("Selenium service string to dict", results, reporter=reporter)
5453

5554

56-
# @unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
57-
# @unittest.skipIf(sys.version_info > (3, 11), reason="Errors change with Python 3.12")
58-
@pytest.mark.skipif(WINDOWS, reason="ApprovalTest do not support different line feeds")
5955
@pytest.mark.skipif(sys.version_info > (3, 11), reason="Errors change with Python 3.12")
6056
def test_parse_service_string_errors(service, reporter):
6157
results = []
@@ -68,7 +64,6 @@ def test_parse_service_string_errors(service, reporter):
6864
verify_all("Selenium service string errors", results, reporter=reporter)
6965

7066

71-
@pytest.mark.skipif(WINDOWS, reason="ApprovalTest do not support different line feeds")
7267
@pytest.mark.skipif(sys.version_info < (3, 12), reason="Errors change with Python 3.12")
7368
def test_parse_service_string_errors_py3_12(service, reporter):
7469
results = []
@@ -81,7 +76,6 @@ def test_parse_service_string_errors_py3_12(service, reporter):
8176
verify_all("Selenium service string errors", results, reporter=reporter)
8277

8378

84-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
8579
def test_split_service(service, reporter):
8680
results = []
8781
results.append(service._split("attribute='arg1'", ';'))
@@ -91,7 +85,6 @@ def test_split_service(service, reporter):
9185
verify_all("Selenium service string splitting", results, reporter=reporter)
9286

9387

94-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
9588
def test_split_attribute(service, reporter):
9689
results = []
9790
results.append(service._split("attribute='arg1'", '='))
@@ -100,7 +93,6 @@ def test_split_attribute(service, reporter):
10093
verify_all("Selenium service attribute string splitting", results, reporter=reporter)
10194

10295

103-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
10496
def test_service_create(service, reporter):
10597
results = []
10698
service_str = "service_args=['--log-level=DEBUG']"
@@ -118,7 +110,6 @@ def test_service_create(service, reporter):
118110
verify_all("Selenium service", results, reporter=reporter)
119111

120112

121-
@unittest.skipIf(WINDOWS, reason="ApprovalTest do not support different line feeds")
122113
def test_importer(service, reporter):
123114
results = []
124115
results.append(service._import_service("firefox"))

‎utest/test/utils/test_xpath_escape.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def reporter():
2121
return factory.get_first_working()
2222

2323

24-
@pytest.mark.skipif(WINDOWS, reason="ApprovalTest do not support different line feeds")
2524
def test_string(reporter):
2625
results = []
2726
results.append(escape_xpath_value("tidii"))

0 commit comments

Comments
 (0)