About 3,530,000 results
Open links in new tab
  1. In python, how to check if a date is valid? - Stack Overflow

    Apr 3, 2012 · In python, how to check if a date is valid? Asked 13 years, 8 months ago Modified 1 year, 9 months ago Viewed 155k times

  2. python - How do I check if a variable exists? - Stack Overflow

    May 9, 2009 · I want to check if a variable exists. Now I'm doing something like this: try: myVar except NameError: # Do something. Are there other ways without exceptions?

  3. How do I run all Python unit tests in a directory?

    Nov 14, 2009 · 503 I have a directory that contains my Python unit tests. Each unit test module is of the form test_*.py. I am attempting to make a file called all_test.py that will, you guessed it, run all files in …

  4. How to test a variable is null in python - Stack Overflow

    May 12, 2017 · How to test a variable is null in python [duplicate] Asked 8 years, 6 months ago Modified 7 years, 10 months ago Viewed 465k times

  5. Testing socket connection in Python - Stack Overflow

    Jun 28, 2016 · This question will expand on: Best way to open a socket in Python When opening a socket how can I test to see if it has been established, and that it did not timeout, or generally fail. …

  6. In Python 3, using Pytest, how do we test for exit code - Stack Overflow

    Jun 17, 2020 · I am new to Pytest in python . I am facing a tricky scenario where I need to test for exit codes - exit(1) and exit(0) , using Pytest module. Below is the python program : def sample_script(): ...

  7. How can I see if there's an available and active network connection in ...

    I want to see if I can access an online API, but for that, I need to have Internet access. How can I see if there's a connection available and active using Python?

  8. Testing regexes in Python using py.test - Stack Overflow

    Apr 2, 2014 · Testing regexes in Python using py.test Asked 11 years, 8 months ago Modified 11 years, 8 months ago Viewed 19k times

  9. python - how to test for a regex match - Stack Overflow

    Sep 4, 2015 · I have a string. Let's call it 'test'. I want to test a match for this string, but only using the backref of a regex. Can I do something like this: import re for line in f.readlines(): if '&...

  10. How do I validate a date string format in python?

    Jun 1, 2013 · I have a python method which accepts a date input as a string. How do I add a validation to make sure the date string being passed to the method is in the ffg. format: