Skip to content

Commit 825925c

Browse files
committed
feat(#183): reproduce
1 parent bb84e67 commit 825925c

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
repo,readme

sr-data/src/tests/test_ghmentions.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,17 @@ def test_founds_mentions(self):
7979
frame = pd.read_csv(path)
8080
self.assertEqual(frame.iloc[0]["readme_imentions"], 1)
8181
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

Comments
 (0)