We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f46351e commit 012e473Copy full SHA for 012e473
Efficiency and Testing/Pytest-Module1.py
@@ -11,3 +11,26 @@
11
teardown_class() method to clean up after tests.
12
"""
13
14
+import sys
15
+
16
+def doubleit(x):
17
+ var = x * 2
18
+ return var
19
20
+if __name__ == "__main__":
21
+ input_val = sys.argv[1]
22
+ doubled_val = doubleit(input_val)
23
24
+ print(f"The value of {input_val} is {doubled_val}")
25
26
27
+import myprogram
28
29
+def test_doubleit():
30
+ assert myprogram.doubleit(10) == 20
31
32
33
34
35
36
Efficiency and Testing/myprogram.py
@@ -0,0 +1,12 @@
1
2
3
4
5
6
7
8
9
10
0 commit comments