Add tests for R

This commit is contained in:
James McMahon 2022-05-20 12:15:03 +01:00
parent 48caf5c8ab
commit ef90653a9c
No known key found for this signature in database
GPG Key ID: BD3621B162996562
3 changed files with 32 additions and 0 deletions

View File

@ -222,3 +222,16 @@ index 525e25d..ba4e68d 100644
- also need to be turned into todos, and hopefully
- kept together as one todo
- #}
diff --git a/tests/example_file.py b/tests/example_file.R
index 525e25d..ba4e68d 100644
--- a/tests/example_file.R
+++ b/tests/example_file.R
@@ -1,23 +1,2 @@
hello_world <- function() {
- # TODO: Come up with a more imaginative greeting
message("Hello world")
-
- # TODO: Do more stuff
- # This function should probably do something more interesting
- # labels: help wanted

View File

@ -232,3 +232,17 @@ index 0000000..7cccc5b
+ also need to be turned into todos, and hopefully
+ kept together as one todo
+ #}
diff --git a/tests/example_file.py b/tests/example_file.R
new file mode 100644
index 0000000..525e25d
--- /dev/null
+++ b/tests/example_file.R
@@ -0,0 +1,23 @@
+hello_world <- function() {
+ # TODO: Come up with a more imaginative greeting
+ message("Hello world")
+
+ # TODO: Do more stuff
+ # This function should probably do something more interesting
+ # labels: help wanted
+}

View File

@ -64,6 +64,9 @@ class NewIssueTests(unittest.TestCase):
def test_twig_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'twig'), 2)
def test_r_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2)
class ClosedIssueTests(unittest.TestCase):
# Check for removed TODOs across the files specified.
@ -117,6 +120,8 @@ class ClosedIssueTests(unittest.TestCase):
def test_twig_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'twig'), 2)
def test_r_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'r'), 2)
class IgnorePatternTests(unittest.TestCase):