add test-script for python debug
This commit is contained in:
parent
c2370b13eb
commit
d32e0ff9e0
3 changed files with 34 additions and 74 deletions
25
pkgs/development/python-modules/test-script/default.nix
Normal file
25
pkgs/development/python-modules/test-script/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ writers, python3Packages }:
|
||||
writers.writePython3Bin "test-script" { libraries = []; } ''
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
def my_function():
|
||||
arg = sys.argv[1]
|
||||
number = int(arg)
|
||||
if (number == 1):
|
||||
os.makedirs('13')
|
||||
if (number == 2):
|
||||
raise Exception("error")
|
||||
if (number == 3):
|
||||
print(200)
|
||||
print(200)
|
||||
print(200)
|
||||
print(200)
|
||||
print(200)
|
||||
print(200)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
my_function()
|
||||
''
|
Loading…
Add table
Add a link
Reference in a new issue