When you already have a package with a name "XXX" and you create a new class 
with its package name as "XXX-YYY", Pharo automatically detects "YYY" as a tag 
for the package and not as a new package. That is your problem. Your class 
TBPostTest is not in a package that ends with "-Tests". It is in "TinyBlog" 
package with the tag "Tests"
________________________________
From: Michael Burns via Pharo-users <pharo-users@lists.pharo.org>
Sent: 24 May 2021 18:00
To: pharo-users@lists.pharo.org <pharo-users@lists.pharo.org>
Cc: Michael and Mary Burns <michaelbu...@mac.com>
Subject: [Pharo-users] Creating tests for the TinyBlog tutorial

In TinyBlogEn-gitc55a88d.pdf on page 11 (2.7 Post Queries):


TestCase subclass: #TBPostTest
       instanceVariableNames: ''
       classVariableNames: ''
       package: 'TinyBlog-Tests'

Every time I save this new class, it ends up in the TinyBlog package, not 
TinyBlog-Tests.

I see that many other packages have *-Tests packages where their tests live.

It seems to test OK so it’s not a stopper for me, but I get an error:
“Test class not in a package with name ending with ‘-Tests’"

I’d like to understand.


I’m running:

Pharo8.0.0
build: 1124, commit: 0932da8

On MacOS 11.3.1. M1 MbPro

[cid:0BB9C009-9EB0-4776-8938-16C0AD452472]

Reply via email to