We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb84e67 commit 825925cCopy full SHA for 825925c
2 files changed
sr-data/src/tests/resources/to-ghmentions-empty.csv
@@ -0,0 +1 @@
1
+repo,readme
sr-data/src/tests/test_ghmentions.py
@@ -79,3 +79,17 @@ def test_founds_mentions(self):
79
frame = pd.read_csv(path)
80
self.assertEqual(frame.iloc[0]["readme_imentions"], 1)
81
self.assertEqual(frame.iloc[0]["readme_pmentions"], 1)
82
+
83
+ @pytest.mark.fast
84
+ def test_returns_zero_records_on_empty_input(self):
85
+ with TemporaryDirectory() as temp:
86
+ path = os.path.join(temp, "mentions.csv")
87
+ main(
88
+ os.path.join(
89
+ os.path.dirname(os.path.realpath(__file__)),
90
+ "resources/to-ghmentions-empty.csv"
91
+ ),
92
+ path
93
+ )
94
+ frame = pd.read_csv(path)
95
+ self.assertTrue(frame.empty)
0 commit comments