Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
from satyampy import __main__ | |
def test_adding(sample_inputs): | |
x, y = sample_inputs | |
assert __main__.adding(x, y) == 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
@pytest.fixture | |
def sample_inputs(): | |
return 2, 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from setuptools import setup, find_packages | |
setup( | |
name='satyampy', | |
version='0.1.3', | |
packages=find_packages(), | |
entry_points={ | |
'console_scripts': [ | |
'satyampy = satyampy.__main__:main' | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def adding(x, y): | |
return x + y | |
def main(): | |
if len(sys.argv) != 3: | |
print("Please provide two numbers as command-line arguments.") | |
else: | |
x = int(sys.argv[1]) |