← Back to team overview

sikuli-driver team mailing list archive

[Bug 903159] Re: Can't have a dash in a filename for Unit tests - e.g. my-test.sikuli

 

If you are interested in "professional" unit testing: faq 1804

** Summary changed:

- Can't have a dash in a filename for Unit tests - e.g. my-test.sikuli
+ X-1.0rc3: IDE: UnitTest: Can't have a dash in a filename - e.g. my-test.sikuli

** Summary changed:

- X-1.0rc3: IDE: UnitTest: Can't have a dash in a filename - e.g. my-test.sikuli
+ X-1.0rc3: IDE: UnitTest: Can't have a dash in a filename - e.g. my-test.sikuli --- workaround

** Description changed:

+ ***** workaround
+ 
+ do not use any special characters in script names, even no space.
+ 
+ Use only letters and numbers.
+ 
+ ------------------------------------------------------------------
+ 
  I was trying out Unit tests, and they would work in the IDE, although if
  I took the code out of unit test format and just ran it, it was fine.
  
  Eventually I tried the simplest working unit test setup, saving as
  something like my-test.sikuli and that wouldn't work. (Got the
  small/shrunken run window, with no tests being run.)
  
  -----
  def setUp(self):
-  print "Sikuli is in Setup"
+  print "Sikuli is in Setup"
  
  def tearDown(self):
-  print "Sikuli is in tearDown"
+  print "Sikuli is in tearDown"
  
  def test_my(self):
-  print "Sikuli is in my test"
-  return True
+  print "Sikuli is in my test"
+  return True
  -----
  
  That made me try changing the name to mytest.sikuli and voila! that ran
  just fine.
  
  Conclusion: Dashes are not allowed in file names for sikuli tests. (I
  rather suspect that probably means that other non-alphanumeric names
  will have problems too - e.g. my.test.sikuli and my_test.sikuli, and "my
  test.sikuli", and probably my\ test.sikuli, for example. However I
  didn't test these variations.)

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/903159

Title:
  X-1.0rc3: IDE: UnitTest: Can't have a dash in a filename - e.g. my-
  test.sikuli --- workaround

Status in Sikuli:
  New

Bug description:
  ***** workaround

  do not use any special characters in script names, even no space.

  Use only letters and numbers.

  ------------------------------------------------------------------

  I was trying out Unit tests, and they would work in the IDE, although
  if I took the code out of unit test format and just ran it, it was
  fine.

  Eventually I tried the simplest working unit test setup, saving as
  something like my-test.sikuli and that wouldn't work. (Got the
  small/shrunken run window, with no tests being run.)

  -----
  def setUp(self):
   print "Sikuli is in Setup"

  def tearDown(self):
   print "Sikuli is in tearDown"

  def test_my(self):
   print "Sikuli is in my test"
   return True
  -----

  That made me try changing the name to mytest.sikuli and voila! that
  ran just fine.

  Conclusion: Dashes are not allowed in file names for sikuli tests. (I
  rather suspect that probably means that other non-alphanumeric names
  will have problems too - e.g. my.test.sikuli and my_test.sikuli, and
  "my test.sikuli", and probably my\ test.sikuli, for example. However I
  didn't test these variations.)

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/903159/+subscriptions


References