Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleanup: Improve CLI #23

Merged
merged 14 commits into from
Apr 30, 2019
Prev Previous commit
Next Next commit
Add tests for parsing
  • Loading branch information
ayan-b committed Apr 14, 2019
commit 58f5853ee35691d03fe2bd94f2a1dad4a1cce69b
13 changes: 13 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import unittest

from xena_gdc_etl import main


class ParserTest(unittest.TestCase):
def setUp(self):
self.parser = main.create_parser()

def test_xena_eql(self):
parsed = self.parser.parse_args(["xena-eql", "df1", "df2"])
self.assertEqual(parsed.df1, "df1")
self.assertEqual(parsed.df2, "df2")
4 changes: 2 additions & 2 deletions xena_gdc_etl/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ def create_parser():
help="Test the equality of 2 Xena matrices."
)
equality_parser.add_argument(
'df1', type=str,
"df1", type=str,
help='Directory for the first matrix.'
)
equality_parser.add_argument(
'df2', type=str,
"df2", type=str,
help='Directory for the second matrix.'
)
return parser